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(native-filters): default value not populated on second opening #14401

Merged
merged 1 commit into from Apr 29, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Apr 29, 2021

SUMMARY

When opening the filter config modal the second time, the default value is not populated correctly. This was caused by two conflicting useEffect hooks that were updating defaultValue in the form data.

BEFORE

default-x.mp4

AFTER

default-after.mp4

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #14401 (f257bce) into master (43ee52b) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14401      +/-   ##
==========================================
- Coverage   76.78%   76.78%   -0.01%     
==========================================
  Files         955      955              
  Lines       48256    48243      -13     
  Branches     6035     6031       -4     
==========================================
- Hits        37054    37041      -13     
  Misses      11007    11007              
  Partials      195      195              
Flag Coverage Δ
javascript 71.29% <100.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...ters/FiltersConfigModal/FiltersConfigForm/state.ts 100.00% <ø> (ø)
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 67.45% <100.00%> (-1.48%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43ee52b...f257bce. Read the comment docs.

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM!

@villebro villebro merged commit 4410fd0 into apache:master Apr 29, 2021
@villebro villebro deleted the villebro/fix-native-default branch April 29, 2021 06:10
amitmiran137 pushed a commit that referenced this pull request Apr 30, 2021
@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label May 28, 2021
@junlincc junlincc added this to In progress in Native dashboard filters via automation May 28, 2021
@junlincc junlincc moved this from In progress to Done in Native dashboard filters May 28, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 dashboard:native-filters Related to the native filters of the Dashboard preset:2021.17 preset-io size/S v1.2 🚢 1.2.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants