Having:
H.parentComponent
{ initialState: initialState
, render
, eval
, receiver: HE.input HandleInput
}
where
{...}
eval :: Query ~> H.ParentDSL State Query Picker.Query Slot Message Aff
eval = case _ of
HandleInput thisMoment next -> do
_ <- H.query SlotFrom (setValue (Just (Right (fromMaybe thisMoment $ aWeekAgoFrom thisMoment))))
_ <- H.query SlotTo (setValue (Just (Right (fromMaybe thisMoment $ tomorrowFrom thisMoment))))
pure next
in the parent, does not result in the children datetime components being rendered with the new values. Instead the placeholder text continues to show.
Basically, I'm expecting that thisMoment <- nowDateTime being trickled down from the main/HalogenAff as inputs after awaitBody should result in the datetime components being initialized. However, because the component takes input as unit, querying the child component is the way to set its initial value.
Having those queries fired even in the receiver handler fails to update the child view.
The values in the child components are updated the second time the parent re-renders though.