Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-07-21 20:48:50 +02:00
parent e45b1a1e41
commit 34f3e62f72
No known key found for this signature in database
GPG key ID: 55C211A1226CB17D
3 changed files with 13 additions and 5 deletions

View file

@ -163,7 +163,7 @@ export default class AddressSelector extends React.Component<IProps, IState> {
return addressList;
}
private maxSelected(list): number {
private maxSelected(list: IUserAddress[]): number {
const listSize = list.length === 0 ? 0 : list.length - 1;
const maxSelected = listSize > (this.props.truncateAt - 1) ? (this.props.truncateAt - 1) : listSize;
return maxSelected;