mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-08 00:02:49 +01:00
fix: prevent view update (#1102)
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
SelectValue
|
||||
} from '@/components/ui/select'
|
||||
|
||||
import isEqual from 'lodash.isequal'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
|
||||
import type { JSONSchema } from '@/lib/types'
|
||||
@@ -34,6 +35,11 @@ onMounted(() => {
|
||||
watch(
|
||||
() => formdata.value,
|
||||
() => {
|
||||
const normFormdata = JSON.parse(JSON.stringify(formdata.value))
|
||||
const normModel = JSON.parse(JSON.stringify(model.value))
|
||||
|
||||
if (isEqual(normFormdata, normModel)) return
|
||||
|
||||
model.value = { ...formdata.value }
|
||||
},
|
||||
{ deep: true }
|
||||
|
||||
Reference in New Issue
Block a user