villebro commented on a change in pull request #13484:
URL: https://github.com/apache/superset/pull/13484#discussion_r590139041
##########
File path:
superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
##########
@@ -89,13 +89,11 @@ export default function PluginFilterSelect(props:
PluginFilterSelectProps) {
useEffect(() => {
handleChange(currentValue ?? []);
- }, [JSON.stringify(currentValue)]);
+ }, [JSON.stringify(currentValue), multiSelect, enableEmptyFilter,
inverseSelection]);
useEffect(() => {
handleChange(defaultValue ?? []);
- // I think after Config Modal update some filter it re-creates default
value for all other filters
- // so we can process it like this `JSON.stringify` or start to use `Immer`
- }, [JSON.stringify(defaultValue)]);
+ }, [JSON.stringify(defaultValue), multiSelect, enableEmptyFilter,
inverseSelection]);
Review comment:
If the filter properties are changed we need to retrigger
`handleChange`, as they will affect the emitted filters.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]