Browse Source

fix/gui-v2-json-bug-fix

pull/2946/head
Muhammed Mustafa 2 years ago
parent
commit
0640e1f594
  1. 11
      packages/nc-gui-v2/components/cell/Json.vue

11
packages/nc-gui-v2/components/cell/Json.vue

@ -7,7 +7,7 @@ import { inject, onMounted } from '#imports'
import { EditModeInj } from '~/context'
interface Props {
modelValue: string
modelValue: string | Record<string, any> | undefined
}
interface Emits {
@ -31,16 +31,17 @@ const clear = () => {
isExpanded = false
editEnabled = false
localValue = vModel
localValue = JSON.stringify(vModel)
}
const onSave = () => {
vModel = localValue
isExpanded = false
vModel = localValue
}
onMounted(() => {
localValue = vModel
console.log('mount', vModel)
localValue = JSON.stringify(vModel)
})
watch(
@ -59,7 +60,7 @@ watch(
() => editEnabled,
() => {
isExpanded = false
localValue = vModel
localValue = JSON.stringify(vModel)
},
)
</script>

Loading…
Cancel
Save