material-table-core / core

Datatable for React based on material-ui's table with additional features. Support us at https://opencollective.com/material-table-core
https://material-table-core.github.io
MIT License
295 stars 146 forks source link

Column filtering is broken after update #843

Closed bobisjan closed 4 months ago

bobisjan commented 4 months ago

Describe the bug Column filtering is broken after update to v6.4.3

To Reproduce Have a table with filtering option set to true

Expected behavior Column filtering works as before

Screenshots

Cannot read properties of undefined (reading 'groupOrder')
TypeError: Cannot read properties of undefined (reading 'groupOrder')
    at http://localhost:3000/static/js/vendors-node_modules_material-table_core_dist_index_js-node_modules_material-ui_icons_AddBox_-863683.chunk.js:11053:32
    at Array.filter (<anonymous>)
    at MTableFilterRow (http://localhost:3000/static/js/vendors-node_modules_material-table_core_dist_index_js-node_modules_material-ui_icons_AddBox_-863683.chunk.js:11052:11)
    at renderWithHooks (http://localhost:3000/static/js/bundle.js:47356:22)
    at mountIndeterminateComponent (http://localhost:3000/static/js/bundle.js:49839:17)
    at beginWork (http://localhost:3000/static/js/bundle.js:50892:20)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:37933:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:37977:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:38032:35)
    at beginWork$1 (http://localhost:3000/static/js/bundle.js:55023:11)

Desktop:

Additional context Probably caused by these changes https://github.com/material-table-core/core/commit/28198974306263d5f8967a89471d3ef9b723d74d#diff-5ee3bd52eeef716c4038c1d4cc318c928359f1c1af7b4f43f1a9b0021891163e, because columns are not columnDefs anymore, because they are mapped to <TableCells, hence tableData is undefined.

cococov commented 4 months ago

Fixed in #849