nussknacker icon indicating copy to clipboard operation
nussknacker copied to clipboard

Support for select box with null option

Open rafa-minimal opened this issue 4 years ago • 1 comments

You can't set blank/null value on optional parameter with fixed values.

See "properties" > "fixedValueOptionalProperty " https://staging.nussknacker.io/visualization/rgl?businessView=false

chrome-capture

Seen on current staging, chrome 80.

rafa-minimal avatar Mar 30 '20 13:03 rafa-minimal

I've realized it can be worked around with additional explicit "blank" value.

editor values       mandatory     effect
"a", "b"            no            can't set blank/null
"blank", "a", "b"   no            ok
"blank", "a", "b"   yes           validation error 

chrome-capture (1)

I'm leaving it up to you, it seems counter intuitive, but it's a minor issue.

Probably it would be easier to remove the concept of optional value from fixed values params and explicitly add blank if neeed.

rafa-minimal avatar Mar 30 '20 14:03 rafa-minimal

Just as you described we support null option by adding

val nullTopicOption: FixedExpressionValue = FixedExpressionValue("", "")

dswiecki avatar Aug 23 '22 12:08 dswiecki