node-red-dashboard icon indicating copy to clipboard operation
node-red-dashboard copied to clipboard

Add abitlity to turn off "On Change" messages for Number Input

Open bveenema opened this issue 2 months ago • 2 comments

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

image image

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/helm to update ConfigMap Template
    • [ ] Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production
  • [ ] Link to Changelog Entry PR, or note why one is not needed.

Labels

  • [ ] Includes a DB migration? -> add the area:migration label

bveenema avatar Oct 30 '25 03:10 bveenema

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 avatar Nov 12 '25 14:11 knolleary

@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.

bveenema avatar Nov 12 '25 17:11 bveenema