Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI dropdown: select falsy value #1587

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bartbutenaers
Copy link
Contributor

Description

When a falsy value (i.e. false, "", or 0) has been selected, the output message will contain payload null.

Example flow:

[{"id":"f192ce1f9de95a8c","type":"ui-dropdown","z":"a663bb334b6ef130","group":"8b1a9ffb134b44f3","name":"","label":"Select Option:","tooltip":"","order":0,"width":0,"height":0,"passthru":false,"multiple":false,"chips":false,"clearable":false,"options":[{"label":"Empty string","value":"","type":"str"},{"label":"False","value":false,"type":"bool"},{"label":"0","value":0,"type":"num"}],"payload":"","topic":"topic","topicType":"msg","className":"","typeIsComboBox":false,"msgTrigger":"onChange","x":1360,"y":100,"wires":[["a68f0818785ba8ef"]]},{"id":"a68f0818785ba8ef","type":"debug","z":"a663bb334b6ef130","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1540,"y":100,"wires":[]},{"id":"8b1a9ffb134b44f3","type":"ui-group","name":"Group Name","page":"71988bc054a986f5","width":6,"height":1,"order":-1,"showTitle":true,"className":"","visible":"true","disabled":"false","groupType":"default"},{"id":"71988bc054a986f5","type":"ui-page","name":"Page 2","ui":"ba0979b23b606ba0","path":"/page2","icon":"home","layout":"grid","theme":"c049776195a75b90","breakpoints":[{"name":"Default","px":"0","cols":"3"},{"name":"Tablet","px":"576","cols":"6"},{"name":"Small Desktop","px":"768","cols":"9"},{"name":"Desktop","px":"1024","cols":"12"}],"order":-1,"className":"","visible":"true","disabled":"false"},{"id":"ba0979b23b606ba0","type":"ui-base","name":"My Dashboard","path":"/dashboard","appIcon":"","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"navigationStyle":"default","titleBarStyle":"default","showReconnectNotification":true,"notificationDisplayTime":1,"showDisconnectNotification":true},{"id":"c049776195a75b90","type":"ui-theme","name":"Default Theme","colors":{"surface":"#ffffff","primary":"#0094CE","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"density":"default","pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]

dropdown-falsy-value

Related Issue(s)

1585

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • 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

Labels

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant