Skip to content

Commit 876c198

Browse files
authored
fix(docs): correct controlled flow docs and replace applyChanges with applyDefault (#1574)
Signed-off-by: braks <[email protected]>
1 parent 3fc0b12 commit 876c198

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/src/guide/controlled-flow.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,23 @@ removeNodes('1')
8282
</script>
8383
```
8484

85-
## The `applyChanges` option
85+
## The `applyDefault` option
8686

87-
The `applyChanges` option is a prop that can be passed to the `<VueFlow>` component to enable or disable automatic change handling.
87+
The `applyDefault` option is a prop that can be passed to the `<VueFlow>` component to enable or disable automatic change handling.
8888

8989
By setting this option to `false`, we tell Vue Flow to not apply changes automatically anymore,
9090
that way we can take control of changes and apply them manually.
9191

9292
```vue
9393
<template>
94-
<VueFlow :nodes="nodes" :edges="edges" :apply-changes="false" />
94+
<VueFlow :nodes="nodes" :edges="edges" :apply-default="false" />
9595
</template>
9696
```
9797

9898
## `onNodesChange` / `onEdgesChange` events
9999

100100
Vue Flow provides two events that can be used to listen to changes on nodes and edges.
101-
These events are emitted regardless of the `applyChanges` option, so you can use them to listen to changes even if you have automatic changes enabled.
101+
These events are emitted regardless of the `applyDefault` option, so you can use them to listen to changes even if you have automatic changes enabled.
102102

103103
```vue
104104
<script setup>
@@ -150,7 +150,7 @@ const onChange = (changes) => {
150150

151151
Using what we just learned, we can now take control of changes and apply them manually.
152152

153-
In this example, we will first disable automatic change handlers with `applyChanges`,
153+
In this example, we will first disable automatic change handlers with `applyDefault`,
154154
then use the `onNodesChange` event to listen to changes and validate delete changes and,
155155
if they are valid, use `applyNodeChanges` to apply them.
156156

0 commit comments

Comments
 (0)