update: make types for nodes and edges a computed prop

* remove nodeTypesId (was used in react to manually trigger a nodeTypes change)

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-20 03:28:46 +01:00
parent 2b87d53c10
commit 1b6ea1e1b5
4 changed files with 21 additions and 16 deletions
+3 -4
View File
@@ -140,11 +140,10 @@ watch(
)
watch(
() => props,
(val, oldVal) => {
const hasDiff = diff(val, oldVal)
if (hasDiff.length > 0) init({ ...store.$state, ...val } as FlowState)
(val) => {
init({ ...store.$state, ...val } as FlowState)
},
{ flush: 'pre', deep: true },
{ flush: 'post', deep: true },
)
init(options)
</script>