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'] MdiRefresh: typeof import('~icons/mdi/refresh')['default']
MdiReload: typeof import('~icons/mdi/reload')['default'] MdiReload: typeof import('~icons/mdi/reload')['default']
MdiRocketLaunchOutline: typeof import('~icons/mdi/rocket-launch-outline')['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'] MdiScriptTextOutline: typeof import('~icons/mdi/script-text-outline')['default']
MdiSearch: typeof import('~icons/mdi/search')['default'] MdiSearch: typeof import('~icons/mdi/search')['default']
MdiShieldLockOutline: typeof import('~icons/mdi/shield-lock-outline')['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( watch(
() => editEnabled.value, () => 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') message.error('Invalid URL')
localState.value = undefined
return
} }
localState.value = value localState.value = value
}, },

Loading…
Cancel
Save