In the new current/archived tabbed version of dashboard, changing from the Archive tab to another tab and back resets which target variable is selected on the Archive tab. In the old version of the dashboard, the target variable (and other user selections) were preserved when changing tabs.
This line resets the target variable options and selection. Since a selection is not provided, by default the value is NULL and the first item in the list of target variable choices is selected.
We need to change the tab-changing behavior so that the previous target is saved and then restored if we immediately switch back to the tab that would show that target. We can use the already-defined PREV_TARGET global and DASH_SUFFIX, indicating which plotting tab was last selected, to implement the logic. The updateTargetChoices will also need to pass a selection to updateRadioButtons (or default to NULL).
Do we want to do this? What is more in line with user expectations -- that target variables reset on tab change (although all other settings don't) or that target variable is remembered?
In the new current/archived tabbed version of dashboard, changing from the
Archive
tab to another tab and back resets which target variable is selected on theArchive
tab. In the old version of the dashboard, the target variable (and other user selections) were preserved when changing tabs.This line resets the target variable options and selection. Since a selection is not provided, by default the value is
NULL
and the first item in the list of target variable choices is selected.We need to change the tab-changing behavior so that the previous target is saved and then restored if we immediately switch back to the tab that would show that target. We can use the already-defined
PREV_TARGET
global andDASH_SUFFIX
, indicating which plotting tab was last selected, to implement the logic. TheupdateTargetChoices
will also need to pass a selection toupdateRadioButtons
(or default toNULL
).