diff --git a/packages/nc-gui/components/extensions/Pane.vue b/packages/nc-gui/components/extensions/Pane.vue index 54b54c329e..dfe8aa85fe 100644 --- a/packages/nc-gui/components/extensions/Pane.vue +++ b/packages/nc-gui/components/extensions/Pane.vue @@ -17,8 +17,6 @@ const { const { $e } = useNuxtApp() -const isReady = ref(false) - const searchExtensionRef = ref() const extensionHeaderRef = ref() @@ -27,6 +25,13 @@ const searchQuery = ref('') const showSearchBox = ref(false) +const panelSize = computed(() => { + if (isPanelExpanded.value) { + return extensionPanelSize.value + } + return 0 +}) + const { width } = useElementSize(extensionHeaderRef) const isOpenSearchBox = computed(() => { @@ -54,14 +59,6 @@ const toggleMarket = () => { isMarketVisible.value = !isMarketVisible.value } -const normalizePaneMaxWidth = computed(() => { - if (isReady.value) { - return 60 - } else { - return extensionPanelSize.value - } -}) - const onMove = async (_event: { moved: { newIndex: number; oldIndex: number; element: ExtensionType } }) => { let { moved: { newIndex = 0, oldIndex = 0, element }, @@ -100,20 +97,6 @@ const onMove = async (_event: { moved: { newIndex: number; oldIndex: number; ele $e('a:extension:reorder') } -defineExpose({ - onReady: () => { - isReady.value = true - }, -}) - -watch(isPanelExpanded, (newValue) => { - if (newValue && !isReady.value) { - setTimeout(() => { - isReady.value = true - }, 300) - } -}) - onClickOutside(searchExtensionRef, () => { if (searchQuery.value) { return @@ -130,125 +113,119 @@ onMounted(() => {