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:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user