You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello All,
I am using ListItemPicker control inside a panel in my react based spfx project solution. I have a reset button in the panel, on click of reset button, the selected values in the ListItemPicker should be cleared. I kept the selected values in a state variable and tried to clear the state on click of reset button. This is clearing the value of the state variable (checked in console), but i am able to see the values in the ListItemPicker HTML text box. Please suggest me possible ways to clear the selected values immediately in the ListItemPicker on click of reset button.
Sample Code:
<ListItemPicker
listId={GUID ID IS PASSED}
columnInternalName='Title'
keyColumnInternalName='Id'
itemLimit={10}
onSelectedItem={this.onTagSelectedItem.bind(this)}
context={this.props.context}
defaultSelectedItems={this.state.tagSelectedValues}
suggestionsHeaderText = "Suggested Tags"
/>
this.state.tagSelectedValues --> I am saving the selected values in "tagSelectedValues" state variable and on click of reset button, i trying to set state as empty to "tagSelectedValues" ( this.setState({tagSelectedValues:[]}); ). But this is not clearing the values in the ListItemPicker HTML Text box immediately.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi @PavithraaPandiyan,
Thank you for reporting the issue. It has been fixed and will be included in the next release.
In a meanwhile you can test the functionality in beta version.
Hello All,
I am using ListItemPicker control inside a panel in my react based spfx project solution. I have a reset button in the panel, on click of reset button, the selected values in the ListItemPicker should be cleared. I kept the selected values in a state variable and tried to clear the state on click of reset button. This is clearing the value of the state variable (checked in console), but i am able to see the values in the ListItemPicker HTML text box. Please suggest me possible ways to clear the selected values immediately in the ListItemPicker on click of reset button.
Sample Code:
<ListItemPicker
listId={GUID ID IS PASSED}
columnInternalName='Title'
keyColumnInternalName='Id'
itemLimit={10}
onSelectedItem={this.onTagSelectedItem.bind(this)}
context={this.props.context}
defaultSelectedItems={this.state.tagSelectedValues}
suggestionsHeaderText = "Suggested Tags"
/>
this.state.tagSelectedValues --> I am saving the selected values in "tagSelectedValues" state variable and on click of reset button, i trying to set state as empty to "tagSelectedValues" ( this.setState({tagSelectedValues:[]}); ). But this is not clearing the values in the ListItemPicker HTML Text box immediately.
Thanks!
The text was updated successfully, but these errors were encountered: