node-red / node-red/node-red.github.io
Document node 'button' property
Aperta
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 118
- Fork
- 161
- Merge medio
- 8h 18m
- PR unite (30g)
- 4
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Non sono indicati né un file di documentazione né un test. Individua la documentazione esistente delle proprietà dei nodi Node-RED e verifica come vengono descritte opzioni simili dei pulsanti. Documenta toggle, enabled e onclick, incluse le relative limitazioni e il relativo comportamento; il lavoro è completato quando sono coperte tutte e tre le proprietà, nonché l’incompatibilità indicata e il comportamento del callback.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100