-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I am creating a report page that allows users to select previous and future timestamps with the calendar dropdown. When they select a day in the past all the values (that I have queried myself), including the form values, should update to that timestamp.
Need to be able to re-query other datapoints in my page when the calendar changes using that timestamp the calendar provides.
One approach might be to expose a
onCalendarChange that provides an object with the calendar's timestamp that can be used as a query key or query param for CDA calls.
Alternatives
Could possibly yank the timestamp out of the context like this?
const { baseTimestamp } = useContext(FormContext);
But might not be obvious as an option for other users that wish to handle this onChange event.