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: Incorrect onChange value when an unloaded value is pasted into AsyncSelect #27996

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Fixes a bug where the onChange event was being fired with an incorrect value when pasting a text that corresponds to an existing option in the database, which was not loaded previously due to pagination.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2024-04-11.at.15.24.01.mov
Screen.Recording.2024-04-11.at.15.23.18.mov

TESTING INSTRUCTIONS

1 - Use an async select that has enough values to trigger pagination. You can also reduce the Select's default page size to test.
2 - Paste a value that is not loaded yet by the Select component
3 - Check that the onChange event is called with the correct value. It's easier to check this when the options have numeric values. In that case, onChange should receive the numeric value instead of the pasted text as the value property.

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

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

LGTM

@michael-s-molina michael-s-molina merged commit 06077d4 into apache:master Apr 12, 2024
30 of 31 checks passed
@michael-s-molina michael-s-molina added v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Apr 15, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request Apr 15, 2024
michael-s-molina added a commit that referenced this pull request Apr 16, 2024
michael-s-molina added a commit that referenced this pull request Apr 16, 2024
michael-s-molina added a commit that referenced this pull request Apr 16, 2024
michael-s-molina added a commit that referenced this pull request Apr 16, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
jzhao62 pushed a commit to jzhao62/superset that referenced this pull request May 16, 2024
@mistercrunch mistercrunch added 🍒 3.1.3 🍒 4.0.1 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 3.1.3 🍒 4.0.1 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants