Browse Source

Merge pull request #7106 from nocodb/nc-fix/field-menu-alignment

fix: Render label span only if default  slot is defined
pull/7110/head
Pranav C 1 year ago committed by GitHub
parent
commit
04e0c0e19d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/nc/Switch.vue

2
packages/nc-gui/components/nc/Switch.vue

@ -12,7 +12,7 @@ const onChange = (e: boolean) => {
<template> <template>
<a-switch v-model:checked="checked" :disabled="props.disabled" class="nc-switch" size="small" @change="onChange"> </a-switch> <a-switch v-model:checked="checked" :disabled="props.disabled" class="nc-switch" size="small" @change="onChange"> </a-switch>
<span class="cursor-pointer pl-2" @click="checked = !checked"> <span v-if="$slots.default" class="cursor-pointer pl-2" @click="checked = !checked">
<slot /> <slot />
</span> </span>
</template> </template>

Loading…
Cancel
Save