You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing this will sync the internal state with your own state, which is useful for situations where you update internal nodes and edges but also want those changes to be reflected in your own state.
227
+
228
+
For example, if you update the type of nodes using `updateNode` and want to see the same change reflected in your own nodes state and not just in the internal state.
229
+
230
+
```vue
231
+
<script setup>
232
+
import { ref } from 'vue'
233
+
import { useVueFlow } from '@vue-flow/core'
234
+
235
+
const nodes = ref([
236
+
{
237
+
id: '1',
238
+
position: { x: 0, y: 0 },
239
+
data: { label: 'Node 1' },
240
+
},
241
+
])
242
+
243
+
const { updateNode } = useVueFlow()
244
+
245
+
// using updateNode will only update the internal state, not the nodes state unless you use v-model
0 commit comments