fix(flow): Add watcher that observes elements length for re-parsing
* instead of deeply watching the elements' arr (which would cause a re-parsing on any element pos change, like dragging a node) we watch the elements + elements arr length and re-parse as necessary Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -166,8 +166,9 @@ invoke(async () => {
|
||||
)
|
||||
})
|
||||
|
||||
throttledWatch(elements, store.setElements, { flush: 'post', throttle: 10 })
|
||||
throttledWatch(store.elements, (val) => (elements.value = val), { flush: 'post', throttle: 10 })
|
||||
watch(elements, store.setElements, { flush: 'post' })
|
||||
watch(() => elements.value.length, () => store.setElements(elements.value), { flush: 'post' })
|
||||
watch(store.elements, (val) => (elements.value = val), { flush: 'post' })
|
||||
|
||||
const transitionName = computed(() => {
|
||||
let name = ''
|
||||
|
||||
Reference in New Issue
Block a user