|
54 | 54 | />
|
55 | 55 |
|
56 | 56 | <template #form-actions>
|
57 |
| - <div |
58 |
| - :id="`plugin-form-default-actions-container-${(config as KongManagerPluginFormConfig).workspace || (config as KonnectPluginFormConfig).controlPlaneId}`" |
59 |
| - ref="actionsDivRef" |
60 |
| - /> |
61 |
| - |
62 | 57 | <!-- if isWizardStep is true we don't want any buttons displayed (default EntityBaseForm buttons included) -->
|
63 |
| - <Teleport |
64 |
| - v-if="!isWizardStep && mounted" |
65 |
| - :to="actionsTeleportTarget ? actionsTeleportTarget : `#plugin-form-default-actions-container-${(config as KongManagerPluginFormConfig).workspace || (config as KonnectPluginFormConfig).controlPlaneId}`" |
| 58 | + <div v-if="isWizardStep" /> |
| 59 | + <PluginFormActionsWrapper |
| 60 | + v-else |
| 61 | + :teleport-target="actionsTeleportTarget" |
66 | 62 | >
|
67 | 63 | <div class="plugin-form-actions">
|
68 | 64 | <KButton
|
|
93 | 89 | {{ t('actions.save') }}
|
94 | 90 | </KButton>
|
95 | 91 | </div>
|
96 |
| - </Teleport> |
| 92 | + </PluginFormActionsWrapper> |
97 | 93 | </template>
|
98 | 94 | </EntityBaseForm>
|
99 | 95 |
|
@@ -172,6 +168,7 @@ import {
|
172 | 168 | type PluginOrdering,
|
173 | 169 | } from '../types'
|
174 | 170 | import PluginEntityForm from './PluginEntityForm.vue'
|
| 171 | +import PluginFormActionsWrapper from './PluginFormActionsWrapper.vue' |
175 | 172 |
|
176 | 173 | const emit = defineEmits<{
|
177 | 174 | (e: 'cancel'): void,
|
@@ -307,7 +304,6 @@ const treatAsCredential = computed((): boolean => !!(props.credential && props.c
|
307 | 304 | const record = ref<Record<string, any> | null>(null)
|
308 | 305 | const configResponse = ref<Record<string, any>>({})
|
309 | 306 | const formLoading = ref(false)
|
310 |
| -const actionsDivRef = ref<HTMLDivElement | null>(null) |
311 | 307 | const formFieldsOriginal = reactive<PluginFormFields>({
|
312 | 308 | enabled: true,
|
313 | 309 | protocols: [],
|
@@ -1237,14 +1233,6 @@ const schemaUrl = computed((): string => {
|
1237 | 1233 | return url
|
1238 | 1234 | })
|
1239 | 1235 |
|
1240 |
| -// track when the actions div is mounted for Teleport |
1241 |
| -const mounted = ref(false) |
1242 |
| -watch(actionsDivRef, (newVal) => { |
1243 |
| - if (newVal) { |
1244 |
| - mounted.value = true |
1245 |
| - } |
1246 |
| -}) |
1247 |
| -
|
1248 | 1236 | const credentialType = ref('')
|
1249 | 1237 | const schemaLoading = ref(false)
|
1250 | 1238 | const fetchSchemaError = ref('')
|
|
0 commit comments