Commit 6952d35b authored by Steffen Michels's avatar Steffen Michels

non-multi selection controls have an invalid value if multiple options are...

non-multi selection controls have an invalid value if multiple options are selected by an onRefresh event
parent e745f6a2
Pipeline #28973 passed with stage
in 4 minutes and 29 seconds
......@@ -219,8 +219,10 @@ where
valueFromState (Just val, sel, multiple)
//The selection is only allowed to be empty when multiselect is enabled
| not multiple && isEmpty sel = Nothing
| otherwise = Just (val, sel)
| not multiple && lengthSel <> 0 && lengthSel <> 1 = Nothing
| otherwise = Just (val, sel)
where
lengthSel = length sel
valueFromState _ = Nothing
mbValToOptions mbVal = toOption <$> maybe [] getOptions mbVal
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