nadbm / react-datasheet

Excel-like data grid (table) component for React
https://nadbm.github.io/react-datasheet/
MIT License
5.39k stars 457 forks source link

Immediate focus of container after a commit can lead to undesirable behaviours #323

Closed schadocalex closed 2 years ago

schadocalex commented 2 years ago

When commiting in a DataEditor, the immediate focus of the container triggers onBlur events before the new render.

I have an onBlur handler in my custom DataEditor, and I was expected after a commit the component to be unmount instead (it is, but after the onBlur).

I reused the same method as here: https://github.com/Shato-io/react-datasheet/blob/33e0a8cebd130f47191d24c18a9cede40f00569e/src/DataSheet.js#L519