Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: PeoplePicker add removePerson safety input check #2033

Conversation

masashiswingle
Copy link
Contributor

@masashiswingle masashiswingle commented Feb 9, 2023

Closes #1997
#1997

PR Type

BugFix

Description of the changes

PeoplePicker Component
Safety checks this.input in the removePerson function. This.input can become null when selectionMode="single" and the a person is selected.

PR checklist

  • Project builds (yarn build) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)
  • All public APIs (classes, methods, etc) have been documented following the jsdoc syntax
    Stories have been added and existing stories have been tested
  • Added appropriate documentation. Docs PR:
  • License header has been added to all new source files (yarn setLicense)
  • Contains NO breaking changes

@ghost
Copy link

ghost commented Feb 9, 2023

Thank you for creating a Pull Request @masashiswingle.

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@masashiswingle masashiswingle changed the title Fix: PeoplePicker removePerson input check Fix: PeoplePicker add removePerson safety input check Feb 9, 2023
Copy link
Member

@gavinbarron gavinbarron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @masashiswingle
Nice catch on this case, could you please make a small style adjustment?

@ghost ghost added the Needs: Author Feedback Issue needs response from issue author label Feb 9, 2023
Co-authored-by: Gavin Barron <[email protected]>
@ghost ghost removed the Needs: Author Feedback Issue needs response from issue author label Feb 10, 2023
Copy link
Contributor

@musale musale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go! Thank you @masashiswingle for this patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] PeoplePicker selectionMode="single"
4 participants