fluentui
fluentui copied to clipboard
Controlled TagPicker prints uncontrolled <> controlled switch React warning
Bug Report
- Package version(s): 4.37.5
Describe the issue:
When using the TagPicker, I receive the following message:
Warning: t is changing an uncontrolled input of type undefined to be controlled. Input elements should not switch from uncontrolled to controlled (or vice versa)...
My TagPicker is defined like this:
<TagPicker
itemLimit={this.props.multi ? Infinity : 1}
onResolveSuggestions={this._onFilterChanged.bind(this)}
selectedItems={this.props.value}
onChange={this.props.onChange.bind(this)}
/>
props.value is set by the parent's component state.value, which is being updated in the passed in props.onChange function.
I believe PR https://github.com/OfficeDev/office-ui-fabric-react/pull/3006 should have fixed this issue. Please reply if issues remain