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

Selected dataset count gets out of sync when removing datasets from Collection view #647

Open
uhLeeshUh opened this issue Oct 9, 2020 · 0 comments

Comments

@uhLeeshUh
Copy link
Contributor

What version of qri are you using (qri version)?

v0.9.13-dev

What version of Qri Desktop are you using?

0.4.6-dev

Issue

What did you do?

  • Add 3 local datasets
  • Navigate to Collection view
  • Select 2 of the datasets via the checkbox
  • Click "Remove" button and select "Remove" on the modal
  • UI appears to have worked successfully
  • Now select the final remaining dataset via checkbox and the copy reads "3 selected"

(note, the same issue happens without bulk remove. If you select a dataset before removing it via the hamburger menu, it persists in table selection state)

What happened?

The internal selected state of the Collection table jumped from the correct number of selected datasets to, after selecting another dataset, the incorrect number (which includes the deleted datasets)

What did you expect to happen?

That those deleted datasets would not be considered selected anymore

Do you have a suggested fix?

The problem is likely that there is a discrepancy between internal component state of the DatasetList component and the ReactDataTable component. This can be visible by logging the value of selectedRows in handleSelectedRowsChange of the DatasetList component

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