Browse Source

fix: provide proper z-index value to avoid unexpected behaviour

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4010/head
Pranav C 2 years ago
parent
commit
e6c686dd32
  1. 2
      packages/nc-gui/components/cell/attachment/Carousel.vue
  2. 8
      packages/nc-gui/components/general/Overlay.vue

2
packages/nc-gui/components/cell/attachment/Carousel.vue

@ -47,7 +47,7 @@ onClickOutside(carouselRef, () => {
</script> </script>
<template> <template>
<general-overlay v-model="selectedImage"> <general-overlay v-model="selectedImage" z-index="1001">
<template v-if="selectedImage"> <template v-if="selectedImage">
<div class="overflow-hidden p-12 text-center relative"> <div class="overflow-hidden p-12 text-center relative">
<div class="text-white group absolute top-5 right-5"> <div class="text-white group absolute top-5 right-5">

8
packages/nc-gui/components/general/Overlay.vue

@ -11,15 +11,18 @@ interface Props {
target?: TeleportProps['to'] target?: TeleportProps['to']
teleportDisabled?: TeleportProps['disabled'] teleportDisabled?: TeleportProps['disabled']
transition?: boolean transition?: boolean
zIndex?: string | number
} }
interface Emits { interface Emits {
(event: 'update:modelValue', value: boolean): void (event: 'update:modelValue', value: boolean): void
(event: 'close'): void (event: 'close'): void
(event: 'open'): void (event: 'open'): void
} }
const { transition = true, teleportDisabled = false, inline = false, target, ...rest } = defineProps<Props>() const { transition = true, teleportDisabled = false, inline = false, target, zIndex = 100, ...rest } = defineProps<Props>()
const emits = defineEmits<Emits>() const emits = defineEmits<Emits>()
@ -47,8 +50,9 @@ export default {
<div <div
v-show="!!vModel" v-show="!!vModel"
v-bind="$attrs" v-bind="$attrs"
:style="{ zIndex }"
:class="[inline ? 'absolute' : 'fixed']" :class="[inline ? 'absolute' : 'fixed']"
class="z-2000 top-0 left-0 bottom-0 right-0 bg-gray-700/75" class="top-0 left-0 bottom-0 right-0 bg-gray-700/75"
> >
<slot :is-open="vModel" /> <slot :is-open="vModel" />
</div> </div>

Loading…
Cancel
Save