-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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 shown in native filters #18963
fix(native-filters): Default value not shown in native filters #18963
Conversation
@@ -288,6 +288,10 @@ const FilterBar: React.FC<FiltersBarProps> = ({ | |||
} | |||
}, [JSON.stringify(filters), JSON.stringify(previousFilters)]); | |||
|
|||
useEffect(() => { | |||
setDataMaskSelected(() => dataMaskApplied); | |||
}, [JSON.stringify(dataMaskApplied), setDataMaskSelected]); |
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.
Can you use dataMaskAppliedText
? It's already converting the JSON to string.
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.
Good point! Done
Codecov Report
@@ Coverage Diff @@
## master #18963 +/- ##
=======================================
Coverage 66.39% 66.39%
=======================================
Files 1641 1641
Lines 63511 63512 +1
Branches 6421 6421
=======================================
+ Hits 42168 42169 +1
Misses 19682 19682
Partials 1661 1661
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@jinghua-qa Ephemeral environment spinning up at http://52.43.101.200:8080. Credentials are |
I found an issue that in number filter, when user choose minimum or maximum for single value, the default chosen value will be off Screen.Recording.2022-02-28.at.10.21.59.AM.mov |
@jinghua-qa @kgabryje Let's tackle the number filter problem in another PR since this is already happening on master. |
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.
Ephemeral environment shutdown and build artifacts deleted. |
🏷️ preset:2022.9 |
* fix(native-filters): Default value not shown in native filters * Reuse stringified datamask (cherry picked from commit 2072225)
SUMMARY
When user created a new filter with a default value, that value wasn't displayed in the filter in filters panel, but could be applied to charts. This PR fixes this issue.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Screen.Recording.2022-02-28.at.14.29.23.mov
After:
Screen.Recording.2022-02-28.at.14.27.36.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION