From 9c37f58992ef36d93f50a4d9350ffa6431cc0c55 Mon Sep 17 00:00:00 2001 From: Brett Edwards Date: Wed, 20 Mar 2024 11:36:33 -0700 Subject: [PATCH] deepClone? cloneDeep --- web/src/features/moreCast2/components/TabbedDataGrid.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/src/features/moreCast2/components/TabbedDataGrid.tsx b/web/src/features/moreCast2/components/TabbedDataGrid.tsx index b125162e0..426c66fcb 100644 --- a/web/src/features/moreCast2/components/TabbedDataGrid.tsx +++ b/web/src/features/moreCast2/components/TabbedDataGrid.tsx @@ -37,7 +37,6 @@ import MoreCast2Snackbar from 'features/moreCast2/components/MoreCast2Snackbar' import { isForecastRowPredicate, getRowsToSave, isForecastValid } from 'features/moreCast2/saveForecasts' import MoreCast2DateRangePicker from 'features/moreCast2/components/MoreCast2DateRangePicker' import { AppDispatch } from 'app/store' -import { deepClone } from '@mui/x-data-grid/utils/utils' import { filterAllVisibleRowsForSimulation } from 'features/moreCast2/rowFilters' import { mapForecastChoiceLabels } from 'features/moreCast2/util' import { MoreCastParams, theme } from 'app/theme' @@ -279,7 +278,7 @@ const TabbedDataGrid = ({ morecast2Rows, fromTo, setFromTo, fetchWeatherIndeterm }, [showHideColumnsModel]) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { - const labelledRows = mapForecastChoiceLabels(morecast2Rows, deepClone(userEditedRows)) + const labelledRows = mapForecastChoiceLabels(morecast2Rows, cloneDeep(userEditedRows)) setAllRows(labelledRows) }, [userEditedRows, morecast2Rows])