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

selectedRowsIds does not update after data update #91

Closed
zichAtIP opened this issue May 11, 2022 · 4 comments
Closed

selectedRowsIds does not update after data update #91

zichAtIP opened this issue May 11, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@zichAtIP
Copy link

Hi!

I'm using your component and I use row selection to bulk delete rows.
I might be wrong here, but it seems as though selectedRowsIds does not update after some data is deleted from the data set the rows prop is connected to.

How to recreate:

  1. Select some rows (say 3 for example)
  2. Delete those rows, set the rows state afterwards
  3. Voila! The rows are deleted from the table but the selected rows counter still displays 3 (and selectedRowsIds still holds the deleted rows)

Cheers!

@NadavShaar
Copy link
Owner

Hi, thanks for reporting this issue, can you please recreate this issue in a live example like in codesandbox or something?

@NadavShaar NadavShaar added the bug Something isn't working label May 13, 2022
@NadavShaar
Copy link
Owner

We are working on a fix.

@NadavShaar
Copy link
Owner

Still working on a possible fix, for now you can clear the selected rows manually if the delete action was successful using:
tableManager.rowSelectionApi.setSelectedRowsIds([])

NadavShaar added a commit that referenced this issue Oct 13, 2022
Added: rowsApi.originalRows
Added: searchApi.validSearchText
Refactoring & Optimization.
@NadavShaar NadavShaar mentioned this issue Oct 13, 2022
@NadavShaar
Copy link
Owner

Fixed in V1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants