Commit c274254d authored by Steffen Michels's avatar Steffen Michels

refresh parametrised dynamic editor when parameter changes

parent e17dde2b
Pipeline #25410 passed with stage
in 5 minutes and 8 seconds
......@@ -172,14 +172,18 @@ where
((dynamicCompoundEditor $ editor p).CompoundEditor.onEdit dp event mbSt childSts vst)
onRefresh dp (p, new) st=:(p`, mbSt) childSts vst
= appFst
(fmap $ appSnd3 \st -> (p, st))
((dynamicCompoundEditor $ editor p).CompoundEditor.onRefresh dp new mbSt childSts vst)
| p === p` =
appFst
(fmap $ appSnd3 \st -> (p, st))
((dynamicCompoundEditor $ editor p).CompoundEditor.onRefresh dp new mbSt childSts vst)
| otherwise =
appFst
(fmap $ \(ui, st, childSts) -> (ReplaceUI ui, (p, st), childSts))
((dynamicCompoundEditor $ editor p).CompoundEditor.genUI 'Map'.newMap dp (Update new) vst)
valueFromState (p, st) childSts
= (\val -> (p, val)) <$> (dynamicCompoundEditor $ editor p).CompoundEditor.valueFromState st childSts
dynamicEditor :: !(DynamicEditor a) -> Editor (DynamicEditorValue a) | TC a
dynamicEditor dynEditor = compoundEditorToEditor $ dynamicCompoundEditor dynEditor
......
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