Skip to content

Commit

Permalink
Web: Files: fixed files selection
Browse files Browse the repository at this point in the history
  • Loading branch information
gopienkonikita committed Jul 1, 2021
1 parent 7b3f411 commit 50d9d91
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions products/ASC.Files/Client/src/HOCs/withFileActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function withFileActions(WrappedFileItem) {
}
onContentFileSelect = (checked, file) => {
const { selectRowAction } = this.props;
if (!file) return;
if (!file || file.id === -1) return;
selectRowAction(checked, file);
};

Expand All @@ -33,7 +33,8 @@ export default function withFileActions(WrappedFileItem) {

fileContextClick = () => {
const { onSelectItem, item } = this.props;
onSelectItem(item);

item.id !== -1 && onSelectItem(item);
};

getSharedButton = (shared) => {
Expand Down Expand Up @@ -156,11 +157,11 @@ export default function withFileActions(WrappedFileItem) {
} else {
if (checked) {
this.onContentFileSelect(!checked, item);
this.fileContextClick(item);
this.fileContextClick();
} else {
if (!isMouseDown) return;
this.onContentFileSelect(true, item);
this.fileContextClick(item);
this.fileContextClick();
}
}
this.setState({ isMouseDown: false });
Expand Down

0 comments on commit 50d9d91

Please sign in to comment.