Skip to content

Commit d4ca9a3

Browse files
committed
refactor(NcModal): manually pass attrs to dialog
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 2bb5d8f commit d4ca9a3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/NcModal/NcModal.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ import { createElementId } from '../../utils/createElementId.ts'
2121
import { getTrapStack } from '../../utils/focusTrap.ts'
2222
import { isRtl } from '../../utils/rtl.ts'
2323
24+
defineOptions({ inheritAttrs: false })
25+
2426
/**
2527
* The show-state of the modal.
2628
*/
27-
const showModal = defineModel<boolean>('show')
29+
const showModal = defineModel<boolean>('show', { default: true })
2830
2931
const props = withDefaults(defineProps<{
3032
/**
@@ -399,6 +401,7 @@ function clearFocusTrap() {
399401
@before-leave="clearFocusTrap">
400402
<div
401403
v-show="showModal"
404+
v-bind="$attrs"
402405
ref="mask"
403406
class="modal-mask"
404407
:class="{

0 commit comments

Comments
 (0)