Replies: 2 comments 5 replies
-
Just an observation from setting a breakpoint on the line from the error message when trying to remove a selected User: The |
Beta Was this translation helpful? Give feedback.
2 replies
-
So your scenario is either empty or there is a selection (of a single user). The default-selected-user-ids seem to be the right option to initialize the control with a list of controlled items. Other option would be to use an empty array vs. a null on the selectedPeople property. Can you confirm one of this could fix your issue? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to add a controlled People Picker component to a SPFx solution. There are two basic scenarios:
The eventual Graph User is fetched in
useEffect
in the component, and set asselectedUser
state variable.I would simply like the People Picker to accept null values, either when there is no Graph User to populate the control, or when I remove the existing user by hitting
x
in the picker. Thedefault-selected-user-ids
does not really fit the scenario. How can I fix this?Right now, this error is thrown when there is
null
user passed to the control:and the relevant line is seen here (
e.id
)Also error from removing the selected User:
In source code:
Beta Was this translation helpful? Give feedback.
All reactions