update: a couple more perfomance related updates
* check for selected value inside Node instead of the wrapping renderer * instead of "parsing" elements just return the current store.elements object * use map funct to find index Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -130,9 +130,10 @@ invoke(async () => {
|
||||
})
|
||||
watch(
|
||||
elements,
|
||||
(val) => {
|
||||
(val, oldVal) => {
|
||||
nextTick(() => {
|
||||
store.setElements(val)
|
||||
const hasDiff = diff(val, oldVal)
|
||||
if (hasDiff.length > 0) store.setElements(val)
|
||||
})
|
||||
},
|
||||
{ flush: 'pre', deep: true },
|
||||
@@ -140,9 +141,10 @@ watch(
|
||||
|
||||
watch(
|
||||
() => store.elements,
|
||||
(val) => {
|
||||
(val, oldVal) => {
|
||||
nextTick(() => {
|
||||
elements.value = val
|
||||
const hasDiff = diff(val, oldVal)
|
||||
if (hasDiff.length > 0) elements.value = val
|
||||
})
|
||||
},
|
||||
{ flush: 'pre', deep: true },
|
||||
|
||||
Reference in New Issue
Block a user