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


##########
superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/index.tsx:
##########
@@ -331,16 +391,16 @@ class AdhocFilterControl extends Component {
     return null;
   }
 
-  addNewFilterPopoverTrigger(trigger) {
+  addNewFilterPopoverTrigger(trigger: ReactNode): JSX.Element {
     return (
       <AdhocFilterPopoverTrigger
-        operators={this.props.operators}
+        operators={this.props.operators as Operators[] | undefined}
         sections={this.props.sections}
         adhocFilter={new AdhocFilter({})}
-        datasource={this.props.datasource}
+        datasource={this.props.datasource as Record<string, unknown> || {}}
         options={this.state.options}
-        onFilterEdit={this.onNewFilter}
-        partitionColumn={this.state.partitionColumn}
+        onFilterEdit={this.onNewFilter as unknown as (editedFilter: 
AdhocFilter) => void}

Review Comment:
   This was **fixed** - the unsafe type assertion was removed. The 
`onNewFilter` method signature was updated to accept `FilterOption | 
AdhocFilter`, eliminating the need for the `as unknown as` cast. See the 
updated code at line 416.



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