react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

Editor is immeditely closed when a row is updated

Open FilipTowarnicki opened this issue 2 years ago • 0 comments

Describe the bug

When editing a cell, if the rows prop is changed, the editor is closed. This behavior is different than in 5.0.1, where the editor is not closed.

To Reproduce

  1. a user begins editing a cell, and enters some text
  2. the rows prop is changed
  3. the editor is closed, discarding the user's input

Link to code example: https://codesandbox.io/p/sandbox/rdg7-cellediting-no586c The setTimeout in the example simulates a slow http request. A user quickly navigating though the grid will often start editing another field before a request can complete.

Expected behavior

The editor should not be closed. See example using 5.0.1, where this works as expected. https://codesandbox.io/s/rdg-cell-editing-forked-pn6ttf

Environment

  • react-data-grid version: 7.0.0-beta.28
  • react/react-dom version: 18.2.0

FilipTowarnicki avatar Apr 21 '23 17:04 FilipTowarnicki