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

Auto-clear checkboxes in user list view after changing experience domains #3178

Merged
merged 5 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.md).
- The fallback segmentation layer attribute of volume tracings is now persisted to NML/ZIP files. Upon re-upload, only volume tracings with this attribute will show a fallback layer. Use `tools/volumeAddFallbackLayer.py` to add this attribute to existing volume tracings. [#3088](https://github.com/scalableminds/webknossos/pull/3088)
- When splitting a tree, the split part that contains the initial node will now keep the original tree name and id. [#3145](https://github.com/scalableminds/webknossos/pull/3145)
- The welcome header will now also show on the default page if there are no existing organisations. [#3133](https://github.com/scalableminds/webknossos/pull/3133)
- The checkboxes in the user list view will clear now after the experience domains of users have been changed. [#3178](https://github.com/scalableminds/webknossos/pull/3178)
- Resetting a user's task requires a confirmation now. [#3181](https://github.com/scalableminds/webknossos/pull/3181)

### Fixed
Expand Down
6 changes: 5 additions & 1 deletion app/assets/javascripts/admin/user/user_list_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ class UserListView extends React.PureComponent<Props, State> {
getCheckboxProps: user => ({
disabled: !user.isActive,
}),
selectedRowKeys: this.state.selectedUserIds,
};

const activationFilterWarning = this.state.activationFilter.includes("true") ? (
Expand Down Expand Up @@ -467,7 +468,10 @@ class UserListView extends React.PureComponent<Props, State> {
visible={this.state.isExperienceModalVisible}
selectedUserIds={this.state.selectedUserIds}
users={this.state.users}
onChange={this.handleUsersChange}
onChange={newUsers => {
this.handleUsersChange(newUsers);
this.setState({ selectedUserIds: [] });
}}
onCancel={() => this.setState({ isExperienceModalVisible: false })}
/>
<TeamRoleModalView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6607,7 +6607,7 @@ Generated by [AVA](https://ava.li).
</Table>␊
</div>␊
</Component>␊
<ExperienceModalView visible={false} selectedUserIds={{...}} users={{...}} onChange={[Function]} onCancel={[Function: onCancel]} />␊
<ExperienceModalView visible={false} selectedUserIds={{...}} users={{...}} onChange={[Function: onChange]} onCancel={[Function: onCancel]} />␊
<TeamRoleModalView visible={false} selectedUserIds={{...}} users={{...}} onChange={[Function]} onCancel={[Function: onCancel]}>␊
<Modal title="Assign Teams" visible={false} onCancel={[Function: onCancel]} footer={{...}} prefixCls="ant-modal" width={520} transitionName="zoom" maskTransitionName="fade" confirmLoading={false} okType="primary">␊
<DialogWrap title="Assign Teams" visible={false} onCancel={[Function: onCancel]} footer={{...}} prefixCls="ant-modal" width={520} transitionName="zoom" maskTransitionName="fade" confirmLoading={false} okType="primary" mousePosition={[undefined]} onClose={[Function]} />␊
Expand Down
Binary file not shown.