mirror of https://github.com/nocodb/nocodb
Browse Source
* feat(nc-gui): link record dropdown setup * fix(nc-gui): move link record pagination to the bottom * feat(nc-gui): link record new design * fix(nc-gui): update bank state subtitle * fix(nc-gui): small changes * fix(nc-gui): update skeleton of link records item * fix(nc-gui): ui break issue * fix(nc-gui): increase z index of link dropdown overlay * fix(nc-gui): update link record dropdown header * fix(nc-gui): update link record dropdown * fix(nc-gui): new changes * fix: remove margin * fix(nc-gui): unlinked records empty state alignment * fix(nc-gui): make tooltip text size 14px * fix(nc-gui): reduce subtext font size * fix(nc-gui): link record item rich text cell alignment issue * fix(nc-gui): on esc link record dropdown should close * fix(nc-gui): update link record header and footer height * fix(nc-gui): add link record dropdown for bt cell * fix(nc-gui): fix invalid offset issue * fix(nc-gui): link record z index issue * fix: PW link unlink corrections * fix(nc-gui): link record dropdown close on outside issue in expanded form * fix(nc-gui): close dropdown after adding link in bt cell * fix(nc-gui): allow close link record dropdown on esc * fix(nc-gui): add link record dropdown in mm component * fix(nc-gui): add link record dropdown in hm component * fix(nc-gui): add link record dropdown in oo component * fix: auto close for BT * fix: ltar modal operations * fix: close link modal * fix: PW tests (wip) * test: fix link modal close in share view * test: fix LTAR in cell handling * fix(nc-gui): reduce link items skeleton height * fix(nc-gui): expanded form open issue on clicking bt cell record * fix(nc-gui): hide back btn if user directly opens record list dropdown * fix(nc-gui): reset offset when user opens link record dropdwon and switch between linked and unlinked records * fix(nc-gui): link record item height * fix(nc-gui): linked record list reload issue on link/unlink * fix(nc-gui): link record item subtext fields width should be same * fix(nc-gui): email, url cell truncate text issue * fix(nc-gui): shared form link record dropdwon ui * chore(nc-gui): lint * fix(nc-gu): small changes * fix(nc-gui): ai review changes * fix(nc-gui): link record list offset issue * fix(nc-gui): show plus btn in bt cell even if it is not blank * fix(nc-gui): barcode visiblility issue in link record dropdown * fix(nc-gui): do not focus links cell plus btn on close dropdown * fix(nc-gui): text color * fix(nc-gui): skip showing qr code null value * fix(nc-gui): virtual cell margin left issue in link record dropdwon * fix(nc-gui): link record subtext order should be same as default view col order * chore(nc-gui): lint * refactor(nocodb): add default view column order in col meta * fix(nc-gui): update default view order on reordering column from fields menu --------- Co-authored-by: Raju Udava <86527202+dstala@users.noreply.github.com>nc-fix/test-cal
Ramesh Mane
7 months ago
committed by
GitHub
29 changed files with 1248 additions and 725 deletions
@ -0,0 +1,85 @@ |
|||||||
|
<script setup lang="ts"> |
||||||
|
import { ref } from 'vue' |
||||||
|
|
||||||
|
interface Props { |
||||||
|
isOpen: boolean |
||||||
|
} |
||||||
|
|
||||||
|
const props = withDefaults(defineProps<Props>(), { |
||||||
|
isOpen: false, |
||||||
|
}) |
||||||
|
|
||||||
|
const emits = defineEmits(['update:isOpen']) |
||||||
|
|
||||||
|
const isOpen = useVModel(props, 'isOpen', emits) |
||||||
|
|
||||||
|
const ncLinksDropdownRef = ref<HTMLDivElement>() |
||||||
|
|
||||||
|
const randomClass = `link-records_${Math.floor(Math.random() * 99999)}` |
||||||
|
|
||||||
|
const addOrRemoveClass = (add: boolean = false) => { |
||||||
|
const dropdownRoot = ncLinksDropdownRef.value?.parentElement?.parentElement?.parentElement?.parentElement as HTMLElement |
||||||
|
if (dropdownRoot) { |
||||||
|
if (add) { |
||||||
|
dropdownRoot.classList.add('inset-0', 'nc-link-dropdown-root', `nc-root-${randomClass}`) |
||||||
|
} else { |
||||||
|
dropdownRoot.classList.remove('inset-0', 'nc-link-dropdown-root', `nc-root-${randomClass}`) |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
watch( |
||||||
|
isOpen, |
||||||
|
(next) => { |
||||||
|
if (next) { |
||||||
|
onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, (e) => { |
||||||
|
const targetEl = e?.target as HTMLElement |
||||||
|
if (!targetEl?.classList.contains(`nc-root-${randomClass}`) || targetEl?.closest(`.nc-${randomClass}`)) { |
||||||
|
return |
||||||
|
} |
||||||
|
isOpen.value = false |
||||||
|
|
||||||
|
addOrRemoveClass(false) |
||||||
|
}) |
||||||
|
} else { |
||||||
|
addOrRemoveClass(false) |
||||||
|
} |
||||||
|
}, |
||||||
|
{ flush: 'post' }, |
||||||
|
) |
||||||
|
|
||||||
|
watch([ncLinksDropdownRef, isOpen], () => { |
||||||
|
if (!ncLinksDropdownRef.value) return |
||||||
|
|
||||||
|
if (isOpen.value) { |
||||||
|
addOrRemoveClass(true) |
||||||
|
} else { |
||||||
|
addOrRemoveClass(false) |
||||||
|
} |
||||||
|
}) |
||||||
|
</script> |
||||||
|
|
||||||
|
<template> |
||||||
|
<NcDropdown |
||||||
|
:visible="isOpen" |
||||||
|
placement="bottom" |
||||||
|
overlay-class-name="nc-links-dropdown !min-w-[540px]" |
||||||
|
:class="`.nc-${randomClass}`" |
||||||
|
> |
||||||
|
<slot /> |
||||||
|
<template #overlay> |
||||||
|
<div ref="ncLinksDropdownRef" class="h-[412px] w-[540px]" :class="`${randomClass}`"> |
||||||
|
<slot name="overlay" /> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</NcDropdown> |
||||||
|
</template> |
||||||
|
|
||||||
|
<style lang="scss"> |
||||||
|
.nc-links-dropdown { |
||||||
|
z-index: 1000 !important; |
||||||
|
} |
||||||
|
.nc-link-dropdown-root { |
||||||
|
z-index: 1000; |
||||||
|
} |
||||||
|
</style> |
Loading…
Reference in new issue