-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong detailPanel prop signature when passing array of functions #455
Comments
Rowdata needs to be the type of the row and not if the column. Rowdata does not contain Word, so it's correct. If you update your type to include word it will work. |
Sorry, it should be https://codesandbox.io/s/material-table-starter-template-forked-vbd27?file=/src/index.tsx:496-529 |
@Domino987 Do you want me to submit a PR with the proposed fix? |
I am currently looking into it but sure! |
…e when detailPanel is an array of callbacks
When passing array of functions to
detailPanel
prop, a typescript error is shown. It works well in runtime.type RowData = { word: string };
rowData.word gives
Property 'word' does not exist on type '{ rowData: RowData; }'.ts(2339)
To Reproduce
Steps to reproduce the behavior:
detailPanel
definitionScreenshots
We probably want no ts error when using
(rowData: RowData) => ...
or a change in detailPanel to make it really return
{ rowData: RowData }
The text was updated successfully, but these errors were encountered: