-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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: Select all issue with "Dynamically search all filter values" in FilterBar #23400
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23400 +/- ##
=======================================
Coverage 67.58% 67.59%
=======================================
Files 1907 1907
Lines 73530 73536 +6
Branches 7980 7981 +1
=======================================
+ Hits 49697 49703 +6
Misses 21785 21785
Partials 2048 2048
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_HORIZONTAL_FILTER_BAR=true |
@jinghua-qa Ephemeral environment spinning up at http://34.214.29.212:8080. Credentials are |
Test the PR locally, the issue have been fixed. LGTM |
@@ -120,6 +121,7 @@ export default function PluginFilterSelect(props: PluginFilterSelectProps) { | |||
}), | |||
[], | |||
); | |||
const [initialData, setInitialData] = useState<typeof data>([]); |
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.
Could we explicitly type it as DataRecord[]
?
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.
Tested, works great! 1 non blocking nit
Ephemeral environment shutdown and build artifacts deleted. |
…FilterBar (apache#23400) (cherry picked from commit 2fe695d)
SUMMARY
When the search was conducted using the "Dynamically search all filter values" in FilterBar, the original options got lost and the Select component was selecting all values as a consequence.
This PR fixes that by keeping the initial data in state and merging it with the new options as they are added.
BEFORE
sc-66800.mp4
AFTER
Unicode.Test.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION