fix: invite search result sorting

This commit is contained in:
Bettenbuk Zoltan 2019-06-05 14:29:10 +02:00 committed by Zoltan Bettenbuk
parent 7234ca69c8
commit bf99051885
1 changed files with 3 additions and 7 deletions

View File

@ -267,8 +267,7 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
const items: Array<*> = inviteItems.concat(item);
this.setState({
// $FlowExpectedError
inviteItems: _.orderBy(items, [ 'name' ], [ 'asc' ])
inviteItems: _.sortBy(items, [ 'name', 'number' ])
});
}
};
@ -318,13 +317,10 @@ class AddPeopleDialog extends AbstractAddPeopleDialog<Props, State> {
}
});
const items = this.state.inviteItems.concat(selectableItems);
// $FlowExpectedError
selectableItems = _.orderBy(items, [ 'name' ], [ 'asc' ]);
selectableItems = _.sortBy(selectableItems, [ 'name', 'number' ]);
this.setState({
selectableItems
selectableItems: this.state.inviteItems.concat(selectableItems)
});
})
.finally(() => {