-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Description
Consider example:
You have a multi-select with async options.
- User clicks on placeholder and now the input is focused
- User types "a" keystroke.
asyncOptionsare loading options for query "a"
this.state.options == [ { value: 1, label: 'AAA' }, { value: 2, label: 'AAB' } ]- User selects from the list option AAA
valuebecomevalue: "1"- Input contains selected option
[AAA]and input is focused - User types "z" keystroke.
asyncOptionsare loading options for query "z"
this.state.options == [ { value: 9, label: 'ZZZ' } ]- User selects from the list option ZZZ
valuebecomevalue: "1,9"
And now the initValuesArray called with value = [1, 9] and options = [ { value: 9, label: 'ZZZ' } ]
So it can resolve label for value 9 but can’t resolve label for value 1. And as a result user has [1] [ZZZ] instead of [AAA] [ZZZ] in the input.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
