node-red / node-red/node-red.github.io
Document node 'button' property
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 118
- Forks
- 161
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 4
Description
button: {
toggle: "active",
enabled: function() {
return !this.changed
},
onclick: function() { }
}
Notes:
toggleidentifies this should be a toggle switch (as used by Debug node). Value is a string that identifies the node property whose value should be toggled betweentrueandfalse.enabledis a function that can be used to determine if the button is active or not - cannot be used withtoggle- new for 0.17.onclickis a function that is called when the button is clicked. This function is called regardless of what theenabledfunction may have returned; in other words, even ifenabledreturnedfalse, this function will still be called when the button is clicked. This allows the node to display a custom notification to tell the user why the button is not enabled.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No documentation file or test is named. Locate the existing Node-RED node property documentation and review how similar button options are described. Document toggle, enabled, and onclick, including their constraints and behavior; done means all three properties and the noted incompatibility and callback behavior are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100