Material-table: TypeScript types for custom actions are wrong

Created on 7 Aug 2019  路  2Comments  路  Source: mbrn/material-table

I have custom action on table. Typescript requires function to have signature:
public customAction(event: any, rowData: IRowData[])
It is ok when selection is enabled, but when selection is disabled and action is executed on single row, rowData is just object of this row (not an array). So now i need to do @ts-ignore or my code dont work.

wontfix

Most helpful comment

The type for parentChildData is also wrong, as the function returns a single dataset and not an array.

All 2 comments

The type for parentChildData is also wrong, as the function returns a single dataset and not an array.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ModPhoenix picture ModPhoenix  路  3Comments

jlgreene2 picture jlgreene2  路  3Comments

balibou picture balibou  路  3Comments

bohrsty picture bohrsty  路  3Comments

lazeebee picture lazeebee  路  3Comments