fix: reload tab content on tab sort

This commit is contained in:
Fabio Di Stasio 2022-06-11 01:11:08 +02:00
parent 77d9cac092
commit d214c1f35b
1 changed files with 3 additions and 18 deletions

View File

@ -315,10 +315,9 @@
</template>
</Draggable>
<WorkspaceEmptyState v-if="!workspace.tabs.length" @new-tab="addQueryTab" />
<template v-for="tab of workspace.tabs">
<template v-for="tab of workspace.tabs" :key="tab.uid">
<WorkspaceTabQuery
v-if="tab.type==='query'"
:key="tab.uid"
v-if="tab.type ==='query'"
:tab-uid="tab.uid"
:tab="tab"
:is-selected="selectedTab === tab.uid"
@ -326,7 +325,7 @@
/>
<WorkspaceTabTable
v-else-if="['temp-data', 'data'].includes(tab.type)"
:key="tab.uid"
v-once
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"
@ -336,7 +335,6 @@
/>
<WorkspaceTabNewTable
v-else-if="tab.type === 'new-table'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -345,7 +343,6 @@
/>
<WorkspaceTabPropsTable
v-else-if="tab.type === 'table-props'"
:key="tab.uid"
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"
@ -354,7 +351,6 @@
/>
<WorkspaceTabNewView
v-else-if="tab.type === 'new-view'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -363,7 +359,6 @@
/>
<WorkspaceTabPropsView
v-else-if="tab.type === 'view-props'"
:key="tab.uid"
:tab-uid="tab.uid"
:is-selected="selectedTab === tab.uid"
:connection="connection"
@ -372,7 +367,6 @@
/>
<WorkspaceTabNewTrigger
v-else-if="tab.type === 'new-trigger'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -382,7 +376,6 @@
/>
<WorkspaceTabPropsTrigger
v-else-if="['temp-trigger-props', 'trigger-props'].includes(tab.type)"
:key="tab.uid"
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"
@ -391,7 +384,6 @@
/>
<WorkspaceTabNewTriggerFunction
v-else-if="tab.type === 'new-trigger-function'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -401,7 +393,6 @@
/>
<WorkspaceTabPropsTriggerFunction
v-else-if="['temp-trigger-function-props', 'trigger-function-props'].includes(tab.type)"
:key="tab.uid"
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"
@ -410,7 +401,6 @@
/>
<WorkspaceTabNewRoutine
v-else-if="tab.type === 'new-routine'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -420,7 +410,6 @@
/>
<WorkspaceTabPropsRoutine
v-else-if="['temp-routine-props', 'routine-props'].includes(tab.type)"
:key="tab.uid"
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"
@ -429,7 +418,6 @@
/>
<WorkspaceTabNewFunction
v-else-if="tab.type === 'new-function'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -439,7 +427,6 @@
/>
<WorkspaceTabPropsFunction
v-else-if="['temp-function-props', 'function-props'].includes(tab.type)"
:key="tab.uid"
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"
@ -448,7 +435,6 @@
/>
<WorkspaceTabNewScheduler
v-else-if="tab.type === 'new-scheduler'"
:key="tab.uid"
:tab-uid="tab.uid"
:tab="tab"
:connection="connection"
@ -458,7 +444,6 @@
/>
<WorkspaceTabPropsScheduler
v-else-if="['temp-scheduler-props', 'scheduler-props'].includes(tab.type)"
:key="tab.uid"
:tab-uid="tab.uid"
:connection="connection"
:is-selected="selectedTab === tab.uid"