Open thekangaroofactory opened 1 month ago
filtered_items reactive calls:
If the first call is removed (bindEvent with ignoreInit = TRUE), then filtered_items will be NULL at startup But if the date slider is not used in the UI, it will always remain NULL
I didn't find any way to check that the date_slider will be in use (it's not initialized on first call, so the input does not exist)
This improvement requires to know if the user will implement the date slider in its UI. Maybe the date slider could be an option in the admin console Then we could skip first call with all items by returning NULL if the option is ON.
In the meantime, it's up to the user to set ignoreInit = TRUE when taking dependency on filtered_items if the date slider is implemented. For example, to not compute a plot on filtered_items until its updated. Documentation is delivered here #364
maybe check for the id in the ui html ??
From testing, it seems that filtered_items is initialized with all items before being filtered. This makes plots be rendered twice upon startup. First with all data, then refreshed with filtered data.
Maybe date_slider get the whole range before the strategy (this-year) is applied. That could be a setting to make sure initialization is done properly and avoid unnecessary updates.