You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Components VariableSelector, TimePeriodSelector, SeasonSelector, and RegionSelector all do generically the same thing to select a default value. However they do this same thing somewhat differently in each case, and this is unnecessarily complicated and confusing.
The generic thing is that they use replaceInvalidValue to select one of the selector's options (derived internally in each selector) when there is an invalid value (usually undefined) for the selector. This makes defaulting easy and quick. The option matching function should be abstracted out to a single, common function, which might profitably be migrated back into component pcic-react-components.
The text was updated successfully, but these errors were encountered:
Components
VariableSelector
,TimePeriodSelector
,SeasonSelector
, andRegionSelector
all do generically the same thing to select a default value. However they do this same thing somewhat differently in each case, and this is unnecessarily complicated and confusing.The generic thing is that they use
replaceInvalidValue
to select one of the selector's options (derived internally in each selector) when there is an invalid value (usuallyundefined
) for the selector. This makes defaulting easy and quick. The option matching function should be abstracted out to a single, common function, which might profitably be migrated back into componentpcic-react-components
.The text was updated successfully, but these errors were encountered: