mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 08:48:01 +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 {
|
} else {
|
||||||
const obj = stateObjs[statePos - 1]
|
const obj = stateObjs[statePos - 1]
|
||||||
if (obj !== undefined) {
|
if (obj !== undefined) {
|
||||||
if (!noScroll) scrollInto(objState, obj)
|
const focusDoc = listListCategory[objState]?.getLimited().find((it) => it._id === obj._id) ?? obj
|
||||||
dispatch('row-focus', obj)
|
if (!noScroll) scrollInto(objState, focusDoc)
|
||||||
|
dispatch('row-focus', focusDoc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -321,16 +322,18 @@
|
|||||||
} else {
|
} else {
|
||||||
const obj = stateObjs[statePos + 1]
|
const obj = stateObjs[statePos + 1]
|
||||||
if (obj !== undefined) {
|
if (obj !== undefined) {
|
||||||
if (!noScroll) scrollInto(objState, obj)
|
const focusDoc = listListCategory[objState]?.getLimited().find((it) => it._id === obj._id) ?? obj
|
||||||
dispatch('row-focus', obj)
|
if (!noScroll) scrollInto(objState, focusDoc)
|
||||||
|
dispatch('row-focus', focusDoc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (offset === 0) {
|
if (offset === 0) {
|
||||||
if (!noScroll) scrollInto(objState, obj)
|
const focusDoc = listListCategory[objState]?.getLimited().find((it) => it._id === obj._id) ?? obj
|
||||||
dispatch('row-focus', obj)
|
if (!noScroll) scrollInto(objState, focusDoc)
|
||||||
|
dispatch('row-focus', focusDoc)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
listCategory[objState]?.select(offset, of, dir, noScroll)
|
listCategory[objState]?.select(offset, of, dir, noScroll)
|
||||||
|
@ -110,6 +110,10 @@
|
|||||||
(res) => {
|
(res) => {
|
||||||
items = res
|
items = res
|
||||||
loading = false
|
loading = false
|
||||||
|
const focusDoc = items.find((it) => it._id === $focusStore.focus?._id)
|
||||||
|
if (focusDoc) {
|
||||||
|
handleRowFocused(focusDoc)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ ...resultOptions, limit: limit ?? 200 }
|
{ ...resultOptions, limit: limit ?? 200 }
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user