UBER-681 Do not select objects when not navigating via keyboard (#3569)

Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
Alexander Onnikov
2023-08-08 21:18:57 +07:00
committed by GitHub
parent 6ef7d36fd8
commit 551432ff3b
9 changed files with 50 additions and 32 deletions
@@ -36,12 +36,14 @@
let list: List
const listProvider = new ListSelectionProvider((offset: 1 | -1 | 0, of?: Doc, dir?: SelectDirection) => {
if (dir === 'vertical') {
// Select next
list?.select(offset, of)
const listProvider = new ListSelectionProvider(
(offset: 1 | -1 | 0, of?: Doc, dir?: SelectDirection, noScroll?: boolean) => {
if (dir === 'vertical') {
// Select next
list?.select(offset, of, noScroll)
}
}
})
)
let docs: Doc[] = []
function select () {
listProvider.update(docs)