Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit b4ca798

Browse files
committed
feat(BModal): change teleport properties.
BREAKING CHANGE: change properties strict to teleportDisabled and to to teleportTo.
1 parent 34ad137 commit b4ca798

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/bootstrap-vue-next/src/components/BModal.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<teleport :to="props.to" :disabled="staticBoolean">
2+
<teleport :to="props.teleportTo" :disabled="teleportDisabledBoolean">
33
<b-transition
44
:no-fade="true"
55
:trans-props="{enterToClass: 'show'}"
@@ -156,9 +156,9 @@ interface BModalProps {
156156
titleClass?: string
157157
titleSrOnly?: Booleanish
158158
titleTag?: string
159-
static?: Booleanish
160159
autoFocusButton?: 'ok' | 'cancel' | 'close'
161-
to?: string | RendererElement | null | undefined
160+
teleportDisabled?: Booleanish
161+
teleportTo?: string | RendererElement | null | undefined
162162
}
163163
164164
const props = withDefaults(defineProps<BModalProps>(), {
@@ -203,13 +203,13 @@ const props = withDefaults(defineProps<BModalProps>(), {
203203
okDisabled: false,
204204
okOnly: false,
205205
okTitle: 'Ok',
206-
static: false,
207206
okVariant: 'primary',
208207
scrollable: false,
209208
show: false,
210209
titleSrOnly: false,
211210
titleTag: 'h5',
212-
to: 'body',
211+
teleportDisabled: false,
212+
teleportTo: 'body',
213213
})
214214
215215
interface BModalEmits {
@@ -269,7 +269,7 @@ const okDisabledBoolean = useBooleanish(() => props.okDisabled)
269269
const okOnlyBoolean = useBooleanish(() => props.okOnly)
270270
const scrollableBoolean = useBooleanish(() => props.scrollable)
271271
const titleSrOnlyBoolean = useBooleanish(() => props.titleSrOnly)
272-
const staticBoolean = useBooleanish(() => props.static)
272+
const teleportDisabledBoolean = useBooleanish(() => props.teleportDisabled)
273273
274274
const element = ref<HTMLElement | null>(null)
275275
const okButton = ref<HTMLElement | null>(null)

packages/bootstrap-vue-next/src/components/modal.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('modal', () => {
2020
it('has body teleports element set by to property', () => {
2121
const wrapper = mount(BModal, {
2222
props: {
23-
to: '#body-teleports',
23+
teleportTo: '#body-teleports',
2424
},
2525
})
2626
expect(wrapper.exists()).toBe(true)

0 commit comments

Comments
 (0)