rusackas commented on code in PR #37625:
URL: https://github.com/apache/superset/pull/37625#discussion_r2770112812
##########
superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.tsx:
##########
@@ -700,37 +737,39 @@ const Chart = props => {
<ChartContainer
width={width}
height={getChartHeight()}
- addFilter={addFilter}
+ addFilter={addFilter as unknown as (type: string) => void}
Review Comment:
~~You're right — the double cast (`as unknown as`) signals a genuine type
mismatch between `addFilter`'s signature and what `ChartContainer` expects.
Aligning these types would require updating either the `addFilter` action
creator's signature or `ChartContainer`'s prop types, which touches multiple
files and could affect runtime behavior. This is pre-existing from the JS code
where the mismatch was invisible. Noted for the RootState/action typing
follow-up.~~
Addressed in 78ab82a88f — fixed the dashboard's `addFilter` callback to
match ChartRenderer's expected signature `(col, vals, merge?, refresh?)` and
updated `ChartContainer`'s prop type accordingly. The double cast is eliminated.
--
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]