Skip to content

Commit

Permalink
deepClone? cloneDeep
Browse files Browse the repository at this point in the history
  • Loading branch information
brettedw committed Mar 20, 2024
1 parent 19940d1 commit 9c37f58
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions web/src/features/moreCast2/components/TabbedDataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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])

Expand Down

0 comments on commit 9c37f58

Please sign in to comment.