Closed
Description
Hi all,
the componentDidUpdate() method in material-table.js
calls equal
to figure out if the columns definition has changed.
This can lead a big performance issues if the title
attribute is a component, e.g.
const columns = [
{
title: <FancyHeader />,
field: 'some_field'
}
...
]
see also this bugreport which describes why comparing two components using "equal" is a bad idea.
In edge cases this can lead to "maximum stack size exceeded" error messages.
Unfortunately there seems to exist no easy way to figure out if two react-components are rendered identically, so IMHO it would be best to consider the column definitions to have changed if the title attribute is a component and skip the equals test.