How to clear the (people)picker control when items are added manually #265
-
When I enter values in for example the people picker and then press a button to submit, I want to clear the values which were added to the picker control. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @rbarten, The Issues 236 has been raised. This is a temporary solution that I found. Button.OnSelect
Only if you are using PreSelectedUserCollection, set the column name from the collection in PeoplePicker.PersonaKey, PeoplePicker.PersonaName...etc PeoplePicker.Items
PeoplePicker.OnSearch
PeoplePicker.Suggestions_Items
Only if you are using UserCollection, set the column name from the collection in PeoplePicker.SuggestionKey, PeoplePicker.SuggestionName...etc If you still have problems, please let me know. |
Beta Was this translation helpful? Give feedback.
-
Exactly the same issue. Items property:
OnSearch property of people picker:
Suggestions_Items property: How to clear the people picker box after the form is submitted?? There should be a method, but I've tried: But, it doesn't work. |
Beta Was this translation helpful? Give feedback.
-
Will there be any updates to the project? For Example, the people picker is still in preview and as far as I know there is no modern people picker control. The modern combo box seems to fall short. |
Beta Was this translation helpful? Give feedback.
Hi @rbarten,
The Issues 236 has been raised. This is a temporary solution that I found.
Button.OnSelect
It would be best to replace User() with functions like AddColumns, Filter...etc. Basically, you need to add items to the collection and then set it to blank. You will need 2 Collections if 1 collection is not working,
Only if you are using PreSelectedUserCollection, set the column name from the collection in PeoplePicker.PersonaKey, PeoplePicker.PersonaName...etc
PeoplePicker.Items
This is only for preselected or leaves blank.
PeoplePicker.On…