Skip to content

Commit

Permalink
Merge pull request #636 from FlowFuse/635-update-value
Browse files Browse the repository at this point in the history
Docs: @update:modelValue not firing inside a ui-template
  • Loading branch information
Steve-Mcl authored Mar 1, 2024
2 parents c595d8e + 61d7397 commit 2d1746f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/nodes/widgets/ui-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,10 @@ Or another example, where the payload is automatically sent any time the `v-mode

```vue
<v-rating hover :length="5" :size="32" v-model="value"
active-color="primary" @update:modelValue="send({payload: value})"/>
active-color="primary" @update:model-value="send({payload: value})"/>
```

`v-model` in Vue is a way of two-way binding a variable to a widget. Here, we bind the `value` variable to the `v-rating` widget. Then we watch for changes on that value with `@update:modelValue` and send the `value` variable to the Node-RED flow via `msg.payload`.
`v-model` in Vue is a way of two-way binding a variable to a widget. Here, we bind the `value` variable to the `v-rating` widget. Then we watch for changes on that value with `@update:model-value` and send the `value` variable to the Node-RED flow via `msg.payload`.

When changed, if wired to a "Debug" node, then we can see the resulting outcome is as follows:

Expand Down

0 comments on commit 2d1746f

Please sign in to comment.