mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-16 05:13:06 +00:00
use $move
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
8ba32cc38f
commit
901e781803
@ -78,15 +78,10 @@
|
||||
|
||||
async function move(to: number) {
|
||||
client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, {
|
||||
$pull: {
|
||||
states: dragState
|
||||
}
|
||||
})
|
||||
client.updateDoc(core.class.SpaceWithStates, core.space.Model, _id, {
|
||||
$push: {
|
||||
$move: {
|
||||
states: {
|
||||
$each: [dragState],
|
||||
$position: to < dragStateInitialPosition ? to : to
|
||||
$value: dragState,
|
||||
$position: to
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user