diegomedina248 commented on code in PR #21443:
URL: https://github.com/apache/superset/pull/21443#discussion_r972504576


##########
superset-frontend/src/components/ListView/Filters/index.tsx:
##########
@@ -74,9 +85,19 @@ function UIFilters(
                 initialValue={initialValue}
                 key={id}
                 name={id}
-                onSelect={(option: SelectOption | undefined) =>
-                  updateFilterValue(index, option)
-                }
+                onSelect={(
+                  option: SelectOption | undefined,
+                  isClear?: boolean,
+                ) => {
+                  if (onFilterUpdate) {
+                    // Filter change triggers both onChange AND onClear, only 
want to track onChange
+                    if (!isClear) {
+                      onFilterUpdate(option);

Review Comment:
   `onFilterUpdate?.(option);` would work too



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to