KevinVandy / material-react-table

A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript
https://material-react-table.com
MIT License
1.52k stars 442 forks source link

[Table] Column with id 'undefined' does not exist #1186

Closed wamra closed 2 months ago

wamra commented 3 months ago

material-react-table version

2.13.0

react & react-dom versions

18.2.0

Describe the bug and the steps to reproduce it

When utilizing the getSubRow handler in the table, eventhough all columns have 'id' set up, I see this error

[Table] Column with id 'undefined' does not exist

thrown a lot in console

image

Minimal, Reproducible Example - (Optional, but Recommended)

Sharing sandbox https://codesandbox.io/p/sandbox/react-mrt-nested-zdj78v

Screenshots or Videos (Optional)

image image

Do you intend to try to help solve this bug with your own PR?

No, because I do not know how

Terms

wamra commented 3 months ago

As it turns out, I made the mistake of copying code from one of the examples here

https://www.material-react-table.com/docs/guides/column-grouping#customize-remove-column-grouping-source-code