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(ListView): avoid firing event on change of selection #27997

Conversation

justinpark
Copy link
Member

SUMMARY

When you paste a value in the list view filter, the input field automatically submits the input value right away.
This happens because the onSelect event is triggered when the onChange event occurs, instead of when the actual selection is made.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

before--filter-onselect.mov

After:

after--filter-onselect.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM! The failing test looks like an easy-peasy fix ;)

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

@justinpark When you paste something on the Select component, it's already selected. The change you did might confuse users because if you paste and then close the select, the filter won't be applied but the value will be selected.

What is the problem of triggering the query when you paste?

@justinpark
Copy link
Member Author

Closed as #28017 solved the issue

@justinpark justinpark closed this Apr 12, 2024
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.

3 participants