fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

BasePicker updateValue does not deal with promise properly

Open MirandaGe opened this issue 9 years ago • 1 comments

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.

MirandaGe avatar Feb 20 '17 15:02 MirandaGe

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

erichdev avatar Oct 12 '17 20:10 erichdev