1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00

Fixed issue with deep clone

This commit is contained in:
Harshil Sharma 2023-01-27 11:36:18 +05:30
parent 6fb01601d5
commit b32757ff6f

View File

@ -6,6 +6,8 @@ import {FormattedMessage, useIntl} from 'react-intl'
import {DragDropContext, Droppable, DropResult} from 'react-beautiful-dnd'
import {cloneDeep} from 'lodash'
import Tooltip from '../../../widgets/tooltip'
import PlusIcon from '../../../widgets/icons/plus'
@ -52,7 +54,7 @@ const EditStatusPropertyDialog = (props: Props): JSX.Element => {
const [focusedValueID, setFocusedValueID] = useState<string>()
useEffect(() => {
setValueCategories(JSON.parse(JSON.stringify(props.valueCategories)))
setValueCategories(cloneDeep(props.valueCategories))
}, [props.valueCategories])
const intl = useIntl()
@ -184,7 +186,6 @@ const EditStatusPropertyDialog = (props: Props): JSX.Element => {
id: valueCategory.emptyState.text.id,
defaultMessage: valueCategory.emptyState.text.defaultMessage,
})}
placement='top'
>
<InfoIcon/>
</Tooltip>