rusackas commented on code in PR #36760:
URL: https://github.com/apache/superset/pull/36760#discussion_r2642204482


##########
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterOption/index.tsx:
##########
@@ -59,14 +60,16 @@ export default function AdhocFilterOption({
       operators={operators}
       adhocFilter={adhocFilter}
       options={options}
-      datasource={datasource}
+      datasource={datasource as Record<string, unknown> || {}}
       onFilterEdit={onFilterEdit}
-      partitionColumn={partitionColumn}
+      partitionColumn={partitionColumn ?? undefined}
     >
       <OptionControlLabel
         label={actualTimeRange ?? adhocFilter.getDefaultLabel()}
         tooltipTitle={title ?? adhocFilter.getTooltipTitle()}
-        onRemove={onRemoveFilter}
+        onRemove={() =>
+          onRemoveFilter({} as React.MouseEvent<Element, MouseEvent>)
+        }

Review Comment:
   The fake MouseEvent includes `stopPropagation: () => {}` which is the only 
method used by the handler. The original JavaScript created this pattern - 
we're just typing what already existed. Since only `stopPropagation()` is 
called on this event, providing a minimal mock is sufficient.



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