Browse Source

fix/removed url validation when it is not required

pull/3185/head
Muhammed Mustafa 2 years ago
parent
commit
60be7e730d
  1. 1
      packages/nc-gui-v2/components.d.ts
  2. 4
      packages/nc-gui-v2/components/cell/Url.vue

1
packages/nc-gui-v2/components.d.ts vendored

@ -155,6 +155,7 @@ declare module '@vue/runtime-core' {
MdiRefresh: typeof import('~icons/mdi/refresh')['default']
MdiReload: typeof import('~icons/mdi/reload')['default']
MdiRocketLaunchOutline: typeof import('~icons/mdi/rocket-launch-outline')['default']
MdiScriptTextKeyOutline: typeof import('~icons/mdi/script-text-key-outline')['default']
MdiScriptTextOutline: typeof import('~icons/mdi/script-text-outline')['default']
MdiSearch: typeof import('~icons/mdi/search')['default']
MdiShieldLockOutline: typeof import('~icons/mdi/shield-lock-outline')['default']

4
packages/nc-gui-v2/components/cell/Url.vue

@ -44,8 +44,10 @@ const focus: VNodeRef = (el) => (el as HTMLInputElement)?.focus()
watch(
() => editEnabled.value,
() => {
if (!editEnabled.value && localState.value && !isValidURL(localState.value)) {
if (column.value.meta?.validate && !editEnabled.value && localState.value && !isValidURL(localState.value)) {
message.error('Invalid URL')
localState.value = undefined
return
}
localState.value = value
},

Loading…
Cancel
Save