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

AutoComplete: Delete chips using delete key #3127

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ElishaSamPeterPrabhu
Copy link
Collaborator

@ElishaSamPeterPrabhu ElishaSamPeterPrabhu commented Jan 17, 2025

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@ElishaSamPeterPrabhu ElishaSamPeterPrabhu requested a review from a team as a code owner January 17, 2025 09:26
@ElishaSamPeterPrabhu ElishaSamPeterPrabhu linked an issue Jan 17, 2025 that may be closed by this pull request
2 tasks
Copy link

netlify bot commented Jan 17, 2025

Deploy Preview for moduswebcomponents ready!

Name Link
🔨 Latest commit 77f76b8
🔍 Latest deploy log https://app.netlify.com/sites/moduswebcomponents/deploys/67926fca3334c20008fea694
😎 Deploy Preview https://deploy-preview-3127--moduswebcomponents.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 41 (🔴 down 3 from production)
Accessibility: 75 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

@jewel-shajan jewel-shajan left a 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.

@coliff coliff changed the title AutoComplete: Delete chips using delete key AutoComplete: Delete chips using delete key Jan 20, 2025
@@ -364,7 +364,18 @@ export class ModusAutocomplete {
this.valueChange.emit(search);
};

handleChipDelete = (e,chip) => {
if(e.key !="Delete") {

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 != ?

Copy link
Collaborator Author

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") {

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.

Copy link
Collaborator Author

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

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

Successfully merging this pull request may close these issues.

AutoComplete: Allow user to delete a chip using tab and delete
3 participants