-
Notifications
You must be signed in to change notification settings - Fork 72
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
AutoComplete: Delete chips using delete
key
#3127
base: main
Are you sure you want to change the base?
AutoComplete: Delete chips using delete
key
#3127
Conversation
✅ Deploy Preview for moduswebcomponents ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Testing completed and ready for review.
delete
key
…p-using-tab-and-delete
@@ -364,7 +364,18 @@ export class ModusAutocomplete { | |||
this.valueChange.emit(search); | |||
}; | |||
|
|||
handleChipDelete = (e,chip) => { | |||
if(e.key !="Delete") { |
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.
is the linter not throwing an error for missing space after the != ?
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.
linter does it for css files, modified it
@@ -364,7 +364,18 @@ export class ModusAutocomplete { | |||
this.valueChange.emit(search); | |||
}; | |||
|
|||
handleChipDelete = (e,chip) => { | |||
if(e.key !="Delete") { |
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.
Its always safe to go with !== to validate the type as well.
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.
Modified it, since e.key is the left operator and a keyboard input , i thought its always going to return the same time as the right operator is hardcoded
…-and-delete' of https://github.com/trimble-oss/modus-web-components into 3108-autocomplete-allow-user-to-delete-a-chip-using-tab-and-delete
…p-using-tab-and-delete
Description
References
Fixes AutoComplete: Allow user to delete a chip using tab and delete #3108
Type of change
How Has This Been Tested?
Checklist