From d68331921904b22cfe81e01741b0fde0ec51d466 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 16 Mar 2023 17:12:07 +0800 Subject: [PATCH] fix(nc-gui): apply parseProp on column meta --- packages/nc-gui/components/cell/Url.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/cell/Url.vue b/packages/nc-gui/components/cell/Url.vue index 9fc73bccfb..335f307995 100644 --- a/packages/nc-gui/components/cell/Url.vue +++ b/packages/nc-gui/components/cell/Url.vue @@ -8,6 +8,7 @@ import { inject, isValidURL, message, + parseProp, ref, useCellUrlConfig, useI18n, @@ -39,7 +40,7 @@ const vModel = computed({ get: () => value, set: (val) => { localState.value = val - if (!column.value.meta?.validate || (val && isValidURL(val)) || !val) { + if (!parseProp(column.value.meta)?.validate || (val && isValidURL(val)) || !val) { emit('update:modelValue', val) } }, @@ -63,7 +64,7 @@ const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus() watch( () => editEnabled.value, () => { - if (column.value.meta?.validate && !editEnabled.value && localState.value && !isValidURL(localState.value)) { + if (parseProp(column.value.meta)?.validate && !editEnabled.value && localState.value && !isValidURL(localState.value)) { message.error(t('msg.error.invalidURL')) localState.value = undefined return @@ -126,6 +127,3 @@ watch( - -