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


##########
superset-frontend/packages/superset-ui-core/src/components/TableCollection/TableCollection.stories.tsx:
##########
@@ -25,20 +25,20 @@ import {
   Row,
   SortingRule,
   HeaderGroup,
-  ColumnInstance,
   TablePropGetter,
   TableBodyPropGetter,
 } from 'react-table';
-import TableCollection from '.';
+import TableCollection, { type ListViewColumn } from '.';
 import { TableSize } from '../Table';
 
-// Type aliases for casting to the component's expected object-based types
-// Required because memo() loses the generic type parameter
+// Type aliases for casting to the component's expected object-based types,
+// since these stories' own useTable() calls are generic over plain `object`
+// rather than a concrete row type.
 type AnyProps = TablePropGetter<object>;
 type AnyBodyProps = TableBodyPropGetter<object>;
 type AnyHeaders = HeaderGroup<object>[];
 type AnyRows = Row<object>[];
-type AnyColumns = ColumnInstance<object>[];
+type AnyColumns = ListViewColumn<object>[];

Review Comment:
   Good catch. Widened `Header`/`Cell` on `ListViewColumn` to the same renderer 
union react-table's `Renderer` allows, so a `ColumnInstance` straight out of 
`useTable()` passes structurally. Dropped the story casts accordingly.



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