1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 02:42:47 +00:00

12.0 list view support multiple selection (#6421)

* Feature - multiple selection with ctrl/shift

* update grid view context menu list in multiple selection mode

* list view support multiple selection

* improve list view selection experience

* before remove activeDirent state

* improve list view selection experience

* fix warnings
This commit is contained in:
Aries
2024-07-26 17:07:26 +08:00
committed by GitHub
parent 9aeaeed894
commit fa46b89b0d
4 changed files with 27 additions and 40 deletions

View File

@@ -129,13 +129,9 @@ class DirentListView extends React.Component {
this.props.onItemSelected(dirent);
};
onDirentClick = (dirent) => {
onDirentClick = (dirent, event) => {
hideMenu();
if (this.props.selectedDirentList.length > 0 && !this.state.activeDirent) {
return;
}
this.setState({ activeDirent: dirent });
this.props.onDirentClick(dirent);
this.props.onDirentClick(dirent, event);
};
sortByName = (e) => {
@@ -306,7 +302,7 @@ class DirentListView extends React.Component {
// table-container contextmenu handle
onContainerClick = () => {
hideMenu();
if (this.state.activeDirent) {
if (this.props.selectedDirentList.length > 0) {
this.onDirentClick(null);
}
};