Skip to content

Commit

Permalink
Ensure example in docs is up-to-date
Browse files Browse the repository at this point in the history
  • Loading branch information
joepavitt committed Jul 28, 2024
1 parent 28d9592 commit fbf42ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/contributing/widgets/core-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ When adding a new widget to Dashboard 2.0, you'll need to ensure that the follow
// received on input from Node-RED
...mapState('data', ['messages']), // provides access to `this.messages` where `this.messages[this.id]` is the stored msg for this widget
},
setup (props) {
// Use our data-tracker, which setups up the basic event handling for us
// including `on('msg-input')` and `on('widget-load')`
useDataTracker(props.id)
created () {
// setup the widget with default onInput, onLoad and onDynamicProperties handlers
this.$dataTracker(this.id)
},
methods: {
onAction () {
Expand Down

0 comments on commit fbf42ca

Please sign in to comment.