-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collapsible validation time fix. #921
base: master
Are you sure you want to change the base?
Conversation
case SET_LANE_VALIDATION_TIME: { | ||
const { experimentRunName, laneNumber, validationTime} = action | ||
const experimentRunLanes = state.runs[experimentRunName] as ExperimentRunLanes | ||
if (experimentRunLanes) { | ||
const lane = experimentRunLanes.lanes.find(x => x.laneNumber === laneNumber) | ||
if (lane) { | ||
lane.validationTime = validationTime | ||
} | ||
} | ||
break | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My condolence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thankfully it's using immer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After my changes, I approve.
Please don't hijack my PRs ... if you have a review to do use words ... |
useEffect(() => { | ||
const refreshedDatasets = lane.datasets.map((dataset) => datasetsById[dataset.datasetID]) | ||
setDatasets(refreshedDatasets as Dataset[]) | ||
}, [datasetsById]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useMemo
would be simpler
return async (dispatch: AppDispatch, getState: () => RootState) => { | ||
const validationTime = lane.datasets.reduce<string | undefined>((latest, dataset) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why rename latestValidationTime
to validationTime
?
No description provided.