mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
Fully rework format action (#3877)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
e85cf1eeab
commit
56dcbeb0cd
@ -301,8 +301,9 @@
|
||||
} else {
|
||||
const obj = stateObjs[statePos - 1]
|
||||
if (obj !== undefined) {
|
||||
if (!noScroll) scrollInto(objState, obj)
|
||||
dispatch('row-focus', obj)
|
||||
const focusDoc = listListCategory[objState]?.getLimited().find((it) => it._id === obj._id) ?? obj
|
||||
if (!noScroll) scrollInto(objState, focusDoc)
|
||||
dispatch('row-focus', focusDoc)
|
||||
}
|
||||
}
|
||||
return
|
||||
@ -321,16 +322,18 @@
|
||||
} else {
|
||||
const obj = stateObjs[statePos + 1]
|
||||
if (obj !== undefined) {
|
||||
if (!noScroll) scrollInto(objState, obj)
|
||||
dispatch('row-focus', obj)
|
||||
const focusDoc = listListCategory[objState]?.getLimited().find((it) => it._id === obj._id) ?? obj
|
||||
if (!noScroll) scrollInto(objState, focusDoc)
|
||||
dispatch('row-focus', focusDoc)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
if (offset === 0) {
|
||||
if (!noScroll) scrollInto(objState, obj)
|
||||
dispatch('row-focus', obj)
|
||||
const focusDoc = listListCategory[objState]?.getLimited().find((it) => it._id === obj._id) ?? obj
|
||||
if (!noScroll) scrollInto(objState, focusDoc)
|
||||
dispatch('row-focus', focusDoc)
|
||||
}
|
||||
} else {
|
||||
listCategory[objState]?.select(offset, of, dir, noScroll)
|
||||
|
@ -110,6 +110,10 @@
|
||||
(res) => {
|
||||
items = res
|
||||
loading = false
|
||||
const focusDoc = items.find((it) => it._id === $focusStore.focus?._id)
|
||||
if (focusDoc) {
|
||||
handleRowFocused(focusDoc)
|
||||
}
|
||||
},
|
||||
{ ...resultOptions, limit: limit ?? 200 }
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user