Commit 9c250e2b authored by Steffen Michels's avatar Steffen Michels

fix checking of valid state for non-multi choice component

parent f2b19cfa
Pipeline #31857 passed with stage
in 6 minutes and 53 seconds
......@@ -221,9 +221,9 @@ where
= (Ok (mergeUIChanges cOptions cSel, (Just newVal, newSel, multiple)),vst)
valueFromState (Just val, sel, multiple)
//The selection is only allowed to be empty when multiselect is enabled
| not multiple && lengthSel <> 0 && lengthSel <> 1 = Nothing
| otherwise = Just (val, sel)
// Non-multi select choice are only valid with a single selected item
| not multiple && lengthSel <> 1 = Nothing
| otherwise = Just (val, sel)
where
lengthSel = length sel
valueFromState _ = Nothing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment