How to fetch value from PeoplePicker sp-dev-fx-controls-react and use it in Rest Call url for filtering?

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/287351

سؤال

I am using PeoplePicker from pnp/spfx for picking people names in order to avoid some spelling mistake. So in order to filter the results in REST Call ajax. The value from PeoplePicker needs to be stored like we have in other API property with name value={this.state.somevariable}. So how will I be able to do that ?

هل كانت مفيدة؟

المحلول

You can get the selected users through onChange property:

enter image description here

In the above method, you can store the values in state or somewhere then use it in another rest API call.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top