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: filtered dropdown items by display value instead of event target #2547

Conversation

cintnguyen
Copy link
Contributor

@cintnguyen cintnguyen commented Aug 15, 2023

Description

Fixes #2535

Deploy Preview

https://deploy-preview-2547--paragon-openedx.netlify.app/components/form/form-autosuggest/

Merge Checklist

  • If your update includes visual changes, have they been reviewed by a designer? Send them a link to the Netlify deploy preview, if applicable.
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@cintnguyen cintnguyen force-pushed the cindy/form-autoSuggest-keyboard-dropdown-behavior branch from 28d5ea7 to 8faa847 Compare August 15, 2023 19:19
@@ -140,7 +140,7 @@ describe('FormAutosuggest', () => {
expect(container.find(dropdownContainer).find('button').length).toEqual(0);

container.find('button.pgn__form-autosuggest__icon-button').simulate('click');
expect(container.find(dropdownContainer).find('button').length).toEqual(3);
expect(container.find(dropdownContainer).find('button').length).toEqual(1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previous behavior was not filtering the options when toggling via the dropdown buttons. This test was verifying that behavior. Now toggling does not change what has been filtered from the dropdown.

@netlify
Copy link

netlify bot commented Aug 15, 2023

Deploy Preview for paragon-openedx ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4a7ae9a
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/64dbd71cdb9ee300082c25b7
😎 Deploy Preview https://deploy-preview-2547--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@cintnguyen cintnguyen force-pushed the cindy/form-autoSuggest-keyboard-dropdown-behavior branch from 8faa847 to 4a7ae9a Compare August 15, 2023 19:33
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f5fb6c9) 91.65% compared to head (4a7ae9a) 91.65%.
Report is 12 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2547   +/-   ##
=======================================
  Coverage   91.65%   91.65%           
=======================================
  Files         236      236           
  Lines        4195     4195           
  Branches     1012     1012           
=======================================
  Hits         3845     3845           
  Misses        346      346           
  Partials        4        4           
Files Changed Coverage Δ
src/Form/FormAutosuggest.jsx 94.44% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamstankiewicz adamstankiewicz merged commit cac6984 into openedx:master Aug 18, 2023
9 checks passed
@edx-semantic-release
Copy link
Contributor

🎉 This PR is included in version 21.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

formAutosuggest: incorrect keyboard dropdown behavior with text entered
4 participants