Skip to content

Commit 78d903e

Browse files
fix(entities): teleport warning (#1001)
1 parent 34f2467 commit 78d903e

File tree

14 files changed

+70
-70
lines changed

14 files changed

+70
-70
lines changed

packages/entities/entities-certificates/src/components/CACertificateList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828
<!-- Create action -->
2929
<template #toolbar-button>
30-
<!-- Hide Create button if table is empty -->
31-
<Teleport
32-
:disabled="!useActionOutside"
33-
to="#kong-ui-app-page-header-action-button"
30+
<component
31+
:is="useActionOutside ? 'Teleport' : 'div'"
32+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3433
>
3534
<PermissionsWrapper :auth-function="() => canCreate()">
35+
<!-- Hide Create button if table is empty -->
3636
<KButton
3737
v-show="hasData"
3838
appearance="primary"
@@ -43,7 +43,7 @@
4343
{{ t('ca-certificates.list.toolbar_actions.new_ca_certificate') }}
4444
</KButton>
4545
</PermissionsWrapper>
46-
</Teleport>
46+
</component>
4747
</template>
4848

4949
<!-- Column Formatting -->

packages/entities/entities-certificates/src/components/CertificateList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828
<!-- Create action -->
2929
<template #toolbar-button>
30-
<!-- Hide Create button if table is empty -->
31-
<Teleport
32-
:disabled="!useActionOutside"
33-
to="#kong-ui-app-page-header-action-button"
30+
<component
31+
:is="useActionOutside ? 'Teleport' : 'div'"
32+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3433
>
3534
<PermissionsWrapper :auth-function="() => canCreate()">
35+
<!-- Hide Create button if table is empty -->
3636
<KButton
3737
v-show="hasData"
3838
appearance="primary"
@@ -43,7 +43,7 @@
4343
{{ t('certificates.list.toolbar_actions.new_certificate') }}
4444
</KButton>
4545
</PermissionsWrapper>
46-
</Teleport>
46+
</component>
4747
</template>
4848

4949
<!-- Column Formatting -->

packages/entities/entities-consumer-credentials/src/components/ConsumerCredentialList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
>
1919
<!-- Create action -->
2020
<template #toolbar-button>
21-
<!-- Hide Create button if table is empty -->
22-
<Teleport
23-
:disabled="!useActionOutside"
24-
to="#kong-ui-app-page-header-action-button"
21+
<component
22+
:is="useActionOutside ? 'Teleport' : 'div'"
23+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
2524
>
2625
<PermissionsWrapper :auth-function="() => canCreate()">
26+
<!-- Hide Create button if table is empty -->
2727
<KButton
2828
v-show="hasData"
2929
appearance="primary"
@@ -34,7 +34,7 @@
3434
{{ t(`credentials.list.toolbar_actions.${config.plugin}.new`) }}
3535
</KButton>
3636
</PermissionsWrapper>
37-
</Teleport>
37+
</component>
3838
</template>
3939

4040
<!-- Column Formatting -->

packages/entities/entities-consumer-groups/src/components/ConsumerGroupList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
</template>
3232
<!-- Create action -->
3333
<template #toolbar-button>
34-
<!-- Hide Create button if table is empty -->
35-
<Teleport
36-
:disabled="!useActionOutside"
37-
to="#kong-ui-app-page-header-action-button"
34+
<component
35+
:is="useActionOutside ? 'Teleport' : 'div'"
36+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3837
>
3938
<PermissionsWrapper :auth-function="() => canCreate()">
39+
<!-- Hide Create button if table is empty -->
4040
<KButton
4141
v-show="hasData"
4242
appearance="primary"
@@ -48,7 +48,7 @@
4848
{{ config.consumerId ? t('consumer_groups.actions.add_to_group') : t('consumer_groups.list.toolbar_actions.new_consumer_group') }}
4949
</KButton>
5050
</PermissionsWrapper>
51-
</Teleport>
51+
</component>
5252
</template>
5353

5454
<!-- Column Formatting -->

packages/entities/entities-consumers/src/components/ConsumerList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
</template>
3232
<!-- Create action -->
3333
<template #toolbar-button>
34-
<!-- Hide Create button if table is empty -->
35-
<Teleport
36-
:disabled="!useActionOutside"
37-
to="#kong-ui-app-page-header-action-button"
34+
<component
35+
:is="useActionOutside ? 'Teleport' : 'div'"
36+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3837
>
3938
<PermissionsWrapper :auth-function="() => canCreate()">
39+
<!-- Hide Create button if table is empty -->
4040
<KButton
4141
v-show="hasData"
4242
appearance="primary"
@@ -48,7 +48,7 @@
4848
{{ config.consumerGroupId ? t('consumers.actions.add_consumer') : t('consumers.list.toolbar_actions.new_consumer') }}
4949
</KButton>
5050
</PermissionsWrapper>
51-
</Teleport>
51+
</component>
5252
</template>
5353

5454
<!-- Column Formatting -->

packages/entities/entities-gateway-services/src/components/GatewayServiceList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828
<!-- Create action -->
2929
<template #toolbar-button>
30-
<!-- Hide Create button if table is empty -->
31-
<Teleport
32-
:disabled="!useActionOutside"
33-
to="#kong-ui-app-page-header-action-button"
30+
<component
31+
:is="useActionOutside ? 'Teleport' : 'div'"
32+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3433
>
3534
<PermissionsWrapper :auth-function="() => canCreate()">
35+
<!-- Hide Create button if table is empty -->
3636
<KButton
3737
v-show="hasData"
3838
appearance="primary"
@@ -43,7 +43,7 @@
4343
{{ t('gateway_services.list.toolbar_actions.new_gateway_service') }}
4444
</KButton>
4545
</PermissionsWrapper>
46-
</Teleport>
46+
</component>
4747
</template>
4848

4949
<!-- Column Formatting -->

packages/entities/entities-key-sets/src/components/KeySetList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828
<!-- Create action -->
2929
<template #toolbar-button>
30-
<!-- Hide Create button if table is empty -->
31-
<Teleport
32-
:disabled="!useActionOutside"
33-
to="#kong-ui-app-page-header-action-button"
30+
<component
31+
:is="useActionOutside ? 'Teleport' : 'div'"
32+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3433
>
3534
<PermissionsWrapper :auth-function="() => canCreate()">
35+
<!-- Hide Create button if table is empty -->
3636
<KButton
3737
v-show="hasData"
3838
appearance="primary"
@@ -43,7 +43,7 @@
4343
{{ t('keySets.list.toolbar_actions.new_key_set') }}
4444
</KButton>
4545
</PermissionsWrapper>
46-
</Teleport>
46+
</component>
4747
</template>
4848

4949
<!-- Column Formatting -->

packages/entities/entities-keys/src/components/KeyList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828
<!-- Create action -->
2929
<template #toolbar-button>
30-
<!-- Hide Create button if table is empty -->
31-
<Teleport
32-
:disabled="!useActionOutside"
33-
to="#kong-ui-app-page-header-action-button"
30+
<component
31+
:is="useActionOutside ? 'Teleport' : 'div'"
32+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3433
>
3534
<PermissionsWrapper :auth-function="() => canCreate()">
35+
<!-- Hide Create button if table is empty -->
3636
<KButton
3737
v-show="hasData"
3838
appearance="primary"
@@ -43,7 +43,7 @@
4343
{{ t('keys.list.toolbar_actions.new_key') }}
4444
</KButton>
4545
</PermissionsWrapper>
46-
</Teleport>
46+
</component>
4747
</template>
4848

4949
<!-- Column Formatting -->

packages/entities/entities-plugins/src/components/PluginList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
</template>
3030
<!-- Create action -->
3131
<template #toolbar-button>
32-
<!-- Hide Create button if table is empty -->
33-
<Teleport
34-
:disabled="!useActionOutside"
35-
to="#kong-ui-app-page-header-action-button"
32+
<component
33+
:is="useActionOutside ? 'Teleport' : 'div'"
34+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3635
>
3736
<PermissionsWrapper :auth-function="() => canCreate()">
37+
<!-- Hide Create button if table is empty -->
3838
<KButton
3939
v-show="hasData"
4040
appearance="primary"
@@ -45,7 +45,7 @@
4545
{{ t('plugins.list.toolbar_actions.new_plugin') }}
4646
</KButton>
4747
</PermissionsWrapper>
48-
</Teleport>
48+
</component>
4949
</template>
5050

5151
<!-- Column Formatting -->

packages/entities/entities-routes/src/components/RouteList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
</template>
2929
<!-- Create action -->
3030
<template #toolbar-button>
31-
<!-- Hide Create button if table is empty -->
32-
<Teleport
33-
:disabled="!useActionOutside"
34-
to="#kong-ui-app-page-header-action-button"
31+
<component
32+
:is="useActionOutside ? 'Teleport' : 'div'"
33+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3534
>
3635
<PermissionsWrapper :auth-function="() => canCreate()">
36+
<!-- Hide Create button if table is empty -->
3737
<KButton
3838
v-show="hasData"
3939
appearance="primary"
@@ -44,7 +44,7 @@
4444
{{ t('routes.list.toolbar_actions.new_route') }}
4545
</KButton>
4646
</PermissionsWrapper>
47-
</Teleport>
47+
</component>
4848
</template>
4949

5050
<!-- Column Formatting -->

packages/entities/entities-snis/src/components/SniList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
</template>
2929
<!-- Create action -->
3030
<template #toolbar-button>
31-
<!-- Hide Create button if table is empty -->
32-
<Teleport
33-
:disabled="!useActionOutside"
34-
to="#kong-ui-app-page-header-action-button"
31+
<component
32+
:is="useActionOutside ? 'Teleport' : 'div'"
33+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3534
>
3635
<PermissionsWrapper :auth-function="() => canCreate()">
36+
<!-- Hide Create button if table is empty -->
3737
<KButton
3838
v-show="hasData"
3939
appearance="primary"
@@ -44,7 +44,7 @@
4444
{{ t('snis.list.toolbar_actions.new') }}
4545
</KButton>
4646
</PermissionsWrapper>
47-
</Teleport>
47+
</component>
4848
</template>
4949

5050
<!-- Column Formatting -->

packages/entities/entities-upstreams-targets/src/components/TargetsList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
>
1919
<!-- Create action -->
2020
<template #toolbar-button>
21-
<!-- Hide Create button if table is empty -->
22-
<Teleport
23-
:disabled="!useActionOutside"
24-
to="#kong-ui-app-page-header-action-button"
21+
<component
22+
:is="useActionOutside ? 'Teleport' : 'div'"
23+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
2524
>
2625
<PermissionsWrapper :auth-function="() => canCreate()">
26+
<!-- Hide Create button if table is empty -->
2727
<KButton
2828
v-show="hasData"
2929
appearance="primary"
@@ -35,7 +35,7 @@
3535
{{ t('targets.list.toolbar_actions.new_target') }}
3636
</KButton>
3737
</PermissionsWrapper>
38-
</Teleport>
38+
</component>
3939
</template>
4040

4141
<!-- Column formatting -->

packages/entities/entities-upstreams-targets/src/components/UpstreamsList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828

2929
<!-- Create action -->
3030
<template #toolbar-button>
31-
<!-- Hide Create button if table is empty -->
32-
<Teleport
33-
:disabled="!useActionOutside"
34-
to="#kong-ui-app-page-header-action-button"
31+
<component
32+
:is="useActionOutside ? 'Teleport' : 'div'"
33+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3534
>
3635
<PermissionsWrapper :auth-function="() => canCreate()">
36+
<!-- Hide Create button if table is empty -->
3737
<KButton
3838
v-show="hasData"
3939
appearance="primary"
@@ -44,7 +44,7 @@
4444
{{ t('upstreams.list.toolbar_actions.new_upstream') }}
4545
</KButton>
4646
</PermissionsWrapper>
47-
</Teleport>
47+
</component>
4848
</template>
4949

5050
<!-- Column formatting -->

packages/entities/entities-vaults/src/components/VaultList.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727
</template>
2828
<!-- Create action -->
2929
<template #toolbar-button>
30-
<!-- Hide Create button if table is empty -->
31-
<Teleport
32-
:disabled="!useActionOutside"
33-
to="#kong-ui-app-page-header-action-button"
30+
<component
31+
:is="useActionOutside ? 'Teleport' : 'div'"
32+
:to="useActionOutside ? '#kong-ui-app-page-header-action-button' : undefined"
3433
>
3534
<PermissionsWrapper :auth-function="() => canCreate()">
35+
<!-- Hide Create button if table is empty -->
3636
<KButton
3737
v-show="hasData"
3838
appearance="primary"
@@ -43,7 +43,7 @@
4343
{{ t('vaults.list.toolbar_actions.new_vault') }}
4444
</KButton>
4545
</PermissionsWrapper>
46-
</Teleport>
46+
</component>
4747
</template>
4848

4949
<!-- Column Formatting -->

0 commit comments

Comments
 (0)