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(dropdown): reset natively #1006

Merged
merged 4 commits into from
Feb 17, 2025
Merged

fix(dropdown): reset natively #1006

merged 4 commits into from
Feb 17, 2025

Conversation

mistermalm
Copy link
Contributor

@mistermalm mistermalm commented Feb 12, 2025

Describe pull-request

This change will listen to the closest form to natively reset the dropdown values.

Issue Linking:

How to test

Provide detailed steps for testing, including any necessary setup.

  1. Add a form around the dropdown in the stories file
  2. Add a form reset button in the form element
  3. Check in storybook to see that the value is reset and the input field looks like the untouched state
  4. Try it out for multiselect as well

Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-1006.d3fazya28914g3.amplifyapp.com

Copy link
Contributor

github-actions bot commented Feb 12, 2025

Playwright test results

failed  2 failed
passed  787 passed
skipped  1 skipped

Details

stats  790 tests across 134 suites
duration  2 minutes, 24 seconds
commit  1b85b88

Failed tests

src/components/popover-canvas/test/default/popover-canvas.e2e.ts › tds-popover-canvas-default-lightmode › renders default popover-canvas correctly
src/components/table/table/test/sorting/table.e2e.ts › tds-table-sorting-primary-lightmode › column headers are clickable

Skipped tests

src/components/table/table/test/expandable-row-autocollapse/expandable-row-autocollapse.e2e.ts › tds-table-expandable-row-autoCollapse › NEEDS FIXING: expanding one row collapses the others when autoCollapse is true

@mistermalm mistermalm changed the title fix:(dropdown) reset natively fix(dropdown): reset natively Feb 13, 2025
@theJohnnyMe
Copy link
Contributor

This is a nice idea to handle native reset ;) Please consider using disconnectCallback to clean up eventListeners. You will find examples in a couple of components in the system. Check out what AI thinks about it. @mistermalm & @max-umain

Copy link
Collaborator

@max-umain max-umain left a comment

Choose a reason for hiding this comment

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

LGTM

@mistermalm mistermalm force-pushed the feat/CDEP-3809-reset-form branch from 9fbd08a to fb2199e Compare February 17, 2025 15:27
@mistermalm mistermalm force-pushed the feat/CDEP-3809-reset-form branch from fb2199e to 1b85b88 Compare February 17, 2025 15:36
Copy link

@mistermalm mistermalm merged commit edf3d75 into develop Feb 17, 2025
3 of 5 checks passed
@mistermalm mistermalm deleted the feat/CDEP-3809-reset-form branch February 17, 2025 15:49
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.

3 participants