Skip to content

Commit

Permalink
Web: files: Added new selection for delete operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaLopaeva committed Nov 9, 2021
1 parent 1d8fa34 commit 86269ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion products/ASC.Files/Client/src/store/FilesActionsStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class FilesActionStore {

let newFilter;

if (selectionLength && isEmptyLastPageAfterOperation()) {
if (selectionLength && isEmptyLastPageAfterOperation(selectionLength)) {
newFilter = resetFilterPage();
}

Expand Down
5 changes: 3 additions & 2 deletions products/ASC.Files/Client/src/store/FilesStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ class FilesStore {
);
};

isEmptyLastPageAfterOperation = () => {
const selection = this.selection?.length || [this.bufferSelection].length;
isEmptyLastPageAfterOperation = (newSelection) => {
const selection =
newSelection || this.selection?.length || [this.bufferSelection].length;

return (
selection &&
Expand Down

0 comments on commit 86269ab

Please sign in to comment.