UBER-1080 improve selection (#3857)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2023-10-19 12:55:28 +07:00
committed by GitHub
parent 20fe438e7e
commit 7fdfaaeece
15 changed files with 176 additions and 73 deletions
@@ -56,7 +56,6 @@
Menu,
noCategory,
SelectDirection,
selectionStore,
setGroupByValues
} from '@hcengineering/view-resources'
import view from '@hcengineering/view-resources/src/plugin'
@@ -113,6 +112,8 @@
const listProvider = new ListSelectionProvider((offset: 1 | -1 | 0, of?: Doc, dir?: SelectDirection) => {
kanbanUI?.select(offset, of, dir)
})
const selection = listProvider.selection
onMount(() => {
;(document.activeElement as HTMLElement)?.blur()
})
@@ -248,7 +249,7 @@
listProvider.updateFocus(evt.detail)
}}
selection={listProvider.current($focusStore)}
checked={$selectionStore ?? []}
checked={$selection ?? []}
on:check={(evt) => {
listProvider.updateSelection(evt.detail.docs, evt.detail.value)
}}