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, } : {}