Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix(nc-gui): Invalid prop: type check failed for prop "modelValue". Expected String with value "undefined", got Undefined at AiPromptWithFields

Ramesh Mane380a2f4821fd
diff --git a/packages/nc-gui/components/ai/PromptWithFields.vue b/packages/nc-gui/components/ai/PromptWithFields.vue
index 38a6ab9014..4f7e139764 100644
--- a/packages/nc-gui/components/ai/PromptWithFields.vue
+++ b/packages/nc-gui/components/ai/PromptWithFields.vue
@@ -10,7 +10,7 @@ import { FieldMentionList, Paragraph } from '~/helpers/tiptap-markdown/extension
const props = withDefaults(
defineProps<{
- modelValue: string
+ modelValue?: string
options?: ColumnType[]
autoFocus?: boolean
promptFieldTagClassName?: string
@@ -39,7 +39,7 @@ const props = withDefaults(
const emits = defineEmits(['update:modelValue', 'keydown'])
const vModel = computed({
- get: () => props.modelValue,
+ get: () => props.modelValue ?? '',
set: (v) => {
emits('update:modelValue', v)
},