fluentui
fluentui copied to clipboard
BasePicker updateValue does not deal with promise properly
Bug Report
- Package version(s): any
- Browser and OS versions: any
Describe the issue:
suggestion may be unmounted before some function still running.
This is because onSuggestionClick called in renderSuggestions() in BasePicker called addItemByIndex, which called updateValue.
The updateValue function may return a promise, and call resolveNewValue function in then() function. If by then the BasePicker is unmounted, there is no input ref in this component but updateValue will use it and throw out 'can't call value of null' error in console.
Closing because it seems the root of this issue is discussed here https://github.com/OfficeDev/office-ui-fabric-react/issues/1202
Please reopen if this is a separate issue that still exists