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: Duplicated numeric values in Select #21480

Merged

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Sep 15, 2022

SUMMARY

When allowNewOptions was true and the options contained numbers as values, if the user searched for a value that already existed, the options would be duplicated because hasOption was not transforming the string input before comparing it with the existing values. Given that the possible value types are string | number | null | undefined, this PR changes that logic to use the equality operator (not strict) to compare the values.

@cccs-RyanK

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before.mov
Screen.Recording.2022-09-13.at.3.20.22.PM.mov

TESTING INSTRUCTIONS

Check the videos for 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

@pull-request-size pull-request-size bot added size/M and removed size/L labels Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #21480 (b1028d9) into master (4fcc1d9) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #21480   +/-   ##
=======================================
  Coverage   66.67%   66.67%           
=======================================
  Files        1791     1791           
  Lines       68459    68459           
  Branches     7268     7268           
=======================================
  Hits        45643    45643           
  Misses      20955    20955           
  Partials     1861     1861           
Flag Coverage Δ
javascript 52.85% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/components/Select/utils.tsx 81.52% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@geido
Copy link
Member

geido commented Sep 16, 2022

/testenv up

@github-actions
Copy link
Contributor

@geido Ephemeral environment spinning up at http://54.245.190.12:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina michael-s-molina merged commit b739e27 into apache:master Sep 16, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

mayurnewase added a commit to mayurnewase/incubator-superset that referenced this pull request Sep 22, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants