Skip to content

Commit 6519a74

Browse files
authored
fix(useOverlay): improve props handling by merging existing and new (#4478)
1 parent da05c37 commit 6519a74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/runtime/composables/useOverlay.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function _useOverlay() {
7171
isMounted: !!defaultOpen,
7272
destroyOnClose: !!destroyOnClose,
7373
originalProps: props || {},
74-
props: { ...(props || {}) }
74+
props: { ...props }
7575
})
7676

7777
overlays.push(options)
@@ -135,7 +135,7 @@ function _useOverlay() {
135135
const patch = <T extends Component>(id: symbol, props: Partial<ComponentProps<T>>): void => {
136136
const overlay = getOverlay(id)
137137

138-
overlay.props = { ...props }
138+
overlay.props = { ...overlay.props, ...props }
139139
}
140140

141141
const getOverlay = (id: symbol): Overlay => {

0 commit comments

Comments
 (0)