diff --git a/packages/nc-gui-v2/components/cell/Json.vue b/packages/nc-gui-v2/components/cell/Json.vue
index b4fb09e740..fad7d4248e 100644
--- a/packages/nc-gui-v2/components/cell/Json.vue
+++ b/packages/nc-gui-v2/components/cell/Json.vue
@@ -80,10 +80,10 @@ watch(
:hide-minimap="true"
@validation-error="onError"
@update:model-value="localValue = $event"
- @value-changed="resetError"
+ @text-changed="resetError"
/>
- {{ error?.toString() }}
+ {{ error.toString() }}
{{ vModel }}
diff --git a/packages/nc-gui-v2/components/monaco/Editor.vue b/packages/nc-gui-v2/components/monaco/Editor.vue
index a833718c64..bbf99fabbb 100644
--- a/packages/nc-gui-v2/components/monaco/Editor.vue
+++ b/packages/nc-gui-v2/components/monaco/Editor.vue
@@ -14,7 +14,7 @@ interface Props {
interface Emits {
(event: 'update:modelValue', model: any): void
(event: 'validationError', error: any): void
- (event: 'valueChanged'): void
+ (event: 'textChanged'): void
}
const props = defineProps()
@@ -84,7 +84,7 @@ onMounted(() => {
try {
isValid.value = true
const obj = JSON.parse(editor.getValue())
- emits('valueChanged')
+ emits('textChanged')
if (!deepCompare(vModel, obj)) vModel = obj
} catch (e) {
isValid.value = false
@@ -107,6 +107,7 @@ watch(
editor.setValue(JSON.stringify(v, null, 2))
}
} catch (e) {
+ console.log(e)
editor.setValue(JSON.stringify(v, null, 2))
}
},