KevinVandy/material-react-table

Inline edit demo lags when `onBlur` is triggered

crva opened this issue ยท 1 comments

crva commented

material-react-table version

2.13.1

react & react-dom versions

18.3.1

Describe the bug and the steps to reproduce it

Hello ๐Ÿ‘‹,

I'm looking to make a table where I can update the fields inline. The documentation demo is the perfect example of what I'm trying to achieve: https://www.material-react-table.com/docs/guides/editing#editing-crud-table-demo ( Inline Table Example )

But if you add more data in the makeData.ts file (e.g. copy and paste 3 times the data) and show like 25 rows per page or more, when the onBlur function is triggered after clicking outside an input there is a lag due to the re-render of the table.

Thanks in advance for the further researches.

Minimal, Reproducible Example - (Optional, but Recommended)

https://stackblitz.com/github/KevinVandy/material-react-table/tree/v2/apps/material-react-table-docs/examples/editing-crud-table/sandbox?file=src%2FTS.tsx

Screenshots or Videos (Optional)

Pay attention to the cursor, you will see a delay when I click somewhere

https://streamable.com/xqszip

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

None

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Rendering lots of Material UI TextField components on the same page isn't that efficient. This isn't really news. It does appear to have gotten a bit better in MUI v6 though. Just don't allow tables to show that many MUI inputs if you're following this strategy.