-
Notifications
You must be signed in to change notification settings - Fork 291
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: properly validate typed in emails and set them on comma or semi-colon key presses #1978
Conversation
this._setAnyMail property is used to check if the comma or semi-colon have been pressed. If they have, then the typed email is checked if it is a valid email and set accordingly.
Thank you for creating a Pull Request @musale. This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:
|
6bbdd31
to
641c9ad
Compare
The updated storybook is available here |
3 similar comments
The updated storybook is available here |
The updated storybook is available here |
The updated storybook is available here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about changing internalProperty to state for builds targeting main
packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts
Show resolved
Hide resolved
When typing an email, I can't make it "selected" by tapping enter or whatever. This needs to be fixed. |
I have fixed this. So, setting an email is done when you press comma, semi-colon or enter keys. |
The updated storybook is available here |
1 similar comment
The updated storybook is available here |
packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts
Show resolved
Hide resolved
The updated storybook is available here |
Closes #1970
PR Type
Description of the changes
RegEx
for validating emails to this https://www.emailregex.comthis._setAnyEmail
to check whether the comm or semi-colon keys have been pressed. If truthy, then set the any email typed if it is valid.internalProperty
tostate
.PR checklist
yarn build
) and changes have been tested in at least two supported browsers (Edge + non-Chromium based browser)yarn setLicense
)Other information