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

Preserve row selection in users table #5486

Merged
merged 3 commits into from May 11, 2021
Merged

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented May 11, 2021

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • set up wk instance with at least two users
  • open users table
  • select a user
  • use the search so that the unselected user is the only remaining element
  • select that remaining user
  • the top left should show that 2 users are selected (before the bug, only one was selected)

Issues:


@philippotto philippotto self-assigned this May 11, 2021
@@ -269,6 +269,7 @@ class UserListView extends React.PureComponent<PropsWithRouter, State> {
render() {
const hasRowsSelected = this.state.selectedUserIds.length > 0;
const rowSelection = {
preserveSelectedRowKeys: true,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find!

As a followup we should check whether that is relevant for any other tables as well (if we actually have more tables with checkboxes 🤔 ).

@philippotto
Copy link
Member Author

Nice find!

Yeah, I went through a bit of trouble before I found that small parameter in the docs 🙈

As a followup we should check whether that is relevant for any other tables as well (if we actually have more tables with checkboxes thinking ).

I already checked that and couldn't find another table which uses the "row selection" prop. Therefore, I think, we should be good here :)

@philippotto philippotto enabled auto-merge (squash) May 11, 2021 12:50
@philippotto philippotto merged commit 3cc3acf into master May 11, 2021
@philippotto philippotto deleted the preserve-row-selection branch May 11, 2021 13:28
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

Successfully merging this pull request may close these issues.

In user list, search changes selection in unexpected ways
2 participants