Skip to content

Commit fe00e61

Browse files
committed
Fix(BModal): fixed the modal's close button located in the header where the button click was not updating v-model value
1 parent 8061be8 commit fe00e61

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
:class="computedCloseButtonClasses"
2525
data-bs-dismiss="modal"
2626
:aria-label="headerCloseLabel"
27+
@click="hide()"
2728
>
2829
<slot name="header-close" />
2930
</button>
@@ -282,12 +283,12 @@ const modalHide = (e: Event) => {
282283
}
283284
284285
const show = () => {
285-
emit('update:modelValue', true)
286+
if (modelValueBoolean.value) emit('update:modelValue', true)
286287
getInstance().show()
287288
}
288289
289290
const hide = () => {
290-
emit('update:modelValue', false)
291+
if (modelValueBoolean.value) emit('update:modelValue', false)
291292
getInstance().hide()
292293
}
293294

0 commit comments

Comments
 (0)