From 98852eb6e12c18c1abfbe393140311a78b384ca0 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Mon, 2 Sep 2024 14:19:01 +0000 Subject: [PATCH] fix(nc-gui): resize extension issue --- packages/nc-gui/components/extensions/Extension.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/components/extensions/Extension.vue b/packages/nc-gui/components/extensions/Extension.vue index e3f1096938..019cfbb494 100644 --- a/packages/nc-gui/components/extensions/Extension.vue +++ b/packages/nc-gui/components/extensions/Extension.vue @@ -38,6 +38,8 @@ const titleEditMode = ref(false) const tempTitle = ref(extension.value.title) +const { height } = useElementSize(extensionRef) + const enableEditMode = () => { titleEditMode.value = true tempTitle.value = extension.value.title @@ -58,6 +60,14 @@ const component = ref(null) const extensionManifest = ref() +const extensionHeight = computed(() => { + const heigthInInt = parseInt(extensionManifest.value?.config?.contentMinHeight || '') || undefined + + if (!heigthInInt || height.value > heigthInInt) return `${height.value}px` + + return extensionManifest.value?.config?.contentMinHeight +}) + const fullscreenModalMaxWidth = computed(() => { const modalMaxWidth = { xs: 'min(calc(100vw - 32px), 448px)', @@ -153,7 +163,7 @@ eventBus.on((event, payload) => { :style=" !collapsed ? { - height: extensionManifest?.config?.contentMinHeight, + height: extensionHeight, minHeight: extensionManifest?.config?.contentMinHeight, } : {}