Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managed data causes table re-render which breaks edit experience #262

Open
Cyrelc opened this issue Jun 2, 2022 · 0 comments
Open

Managed data causes table re-render which breaks edit experience #262

Cyrelc opened this issue Jun 2, 2022 · 0 comments

Comments

@Cyrelc
Copy link

Cyrelc commented Jun 2, 2022

Title

  • bug: Managed data causes table re-render which breaks edit experience

Environment Details

  • react-tabulator version: 0.18.1
  • OS: Ubuntu
  • Node.js version: 14.18.2

Long Description
When using a table with managed data and the edit functionality, hitting "tab" to go to the next column - and having it write back to state or a reducer, will cause the table to re-render and lose your position. Is there a better way to go about this, and still have a single source of truth?

Further details - in another implementation I have several tables in the same component, so passing refs is not an option
Recording 2022-06-02 at 10 47 13

<ReactTabulator
     columns={packageColumns}
     data={packages}
     events={{
          cellEdited: cell => {
               props.dispatch({type: 'UPDATE_PACKAGES', payload: cell.getTable().getData()})
          }
     }}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant