Merge pull request #2985 from standardnotes/fix/multiple-selection-issues
fix: multiple selection issues
This commit is contained in:
@@ -269,10 +269,9 @@ export class ItemListController
|
|||||||
this.disposers.push(
|
this.disposers.push(
|
||||||
reaction(
|
reaction(
|
||||||
() => this.selectedItemsCount,
|
() => this.selectedItemsCount,
|
||||||
(count, prevCount) => {
|
(count) => {
|
||||||
const hasNoSelectedItem = count === 0
|
const hasNoSelectedItem = count === 0
|
||||||
const onlyOneSelectedItemAfterChange = prevCount > count && count === 1
|
if (hasNoSelectedItem) {
|
||||||
if (hasNoSelectedItem || onlyOneSelectedItemAfterChange) {
|
|
||||||
this.cancelMultipleSelection()
|
this.cancelMultipleSelection()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1187,7 +1186,7 @@ export class ItemListController
|
|||||||
if (userTriggered && hasShift && !isMobileScreen()) {
|
if (userTriggered && hasShift && !isMobileScreen()) {
|
||||||
await this.selectItemsRange({ selectedItem: item })
|
await this.selectItemsRange({ selectedItem: item })
|
||||||
} else if (userTriggered && this.isMultipleSelectionMode) {
|
} else if (userTriggered && this.isMultipleSelectionMode) {
|
||||||
if (this.selectedUuids.has(uuid) && hasMoreThanOneSelected) {
|
if (this.selectedUuids.has(uuid)) {
|
||||||
this.removeSelectedItem(uuid)
|
this.removeSelectedItem(uuid)
|
||||||
} else if (isAuthorizedForAccess) {
|
} else if (isAuthorizedForAccess) {
|
||||||
this.selectedUuids.add(uuid)
|
this.selectedUuids.add(uuid)
|
||||||
|
|||||||
Reference in New Issue
Block a user