Add abitlity to turn off "On Change" messages for Number Input
Description
Adds checkbox to "Send message on" section for "On Change". When disabled, node will only send messages on Focus Leave or Press Enter (if checked). Default value for On Change is set to true for backwards compatibility.
Also adds "event" field to the msg output with possible values of "onChange", "focusLeave" or "pressEnter" to enable downstream filtering
Related Issue(s)
Not related to a particular issue # that I found. This problem came up while building a configuration manager using the number input node. Configuration was being updated as I typed number into the field due to messages being sent and no way to determine the source of the message (onChange, focusLeave or pressEnter). For configuration management, we need to be explicit about what values are being set. This solution is better than a "save" button solution which could have triggered all updates.
Checklist
- [X] I have read the contribution guidelines
- [ ] Suitable unit/system level tests have been added and they pass
- [X] Documentation has been updated
- [x] Upgrade instructions
- [x] Configuration details
- [x] Concepts
- [ ] Changes
flowforge.yml?- [ ] Issue/PR raised on
FlowFuse/helmto update ConfigMap Template - [ ] Issue/PR raised on
FlowFuse/CloudProjectto update values for Staging/Production
- [ ] Issue/PR raised on
- [ ] Link to Changelog Entry PR, or note why one is not needed.
Labels
- [ ] Includes a DB migration? -> add the
area:migrationlabel
Thanks @bveenema - well get this reviewed soon. One thought for us to check on is whether we should add a similar option to any other text-based inputs and not just the number input. We should make sure we have a consistent UX between them.
@knolleary Thanks, I'll look into the tests that are failing. Likely won't be until the weekend. I did notice that some Dashboard 2 nodes send an "_event" field the msg. I don't recall which ones at this moment but that may be a better semantic place than creating a new "event" field in the root.