-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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): fix Select filter crashing when changing filter type #15090
Conversation
2a8052b
to
730aa1d
Compare
Codecov Report
@@ Coverage Diff @@
## master #15090 +/- ##
=======================================
Coverage 77.62% 77.62%
=======================================
Files 967 967
Lines 49702 49709 +7
Branches 6338 6339 +1
=======================================
+ Hits 38579 38586 +7
Misses 10920 10920
Partials 203 203
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=True |
@rusackas Ephemeral environment spinning up at http://52.42.239.244:8080. Credentials are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the fix!
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
When user changed filter type from "Time range" to "Value", the filter crashed. The reason was that in Value filter we assumed that
filterState.value
is either an array or undefined. When we switched filter type from "Time range",filterState.value
was actually a string, which caused a crash. This PR fixes it by resettingdataMaskSelected
for given filter inFilterBar
to it's initial value when filter's type is changedBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
https://user-images.githubusercontent.com/15073128/121539232-c5f8db80-ca05-11eb-9c47-a35ace7124e8.mov
After:
https://user-images.githubusercontent.com/15073128/121539403-f17bc600-ca05-11eb-949d-a1787379db4a.mov
TESTING INSTRUCTIONS
DASHBOARD_NATIVE_FILTERS
feature flag to TrueADDITIONAL INFORMATION
CC: @junlincc @villebro