Skip to content

Commit 5ad7dab

Browse files
authored
fix(useOverlay): don't use patch when passing props to open (#4497)
1 parent d8160ba commit 5ad7dab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/runtime/composables/useOverlay.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ function _useOverlay() {
8787
const open = <T extends Component>(id: symbol, props?: ComponentProps<T>): OpenedOverlay<T> => {
8888
const overlay = getOverlay(id)
8989

90-
// If props are provided, update the overlay's props
90+
// If props are provided, merge them with the original props, otherwise use the original props
9191
if (props) {
92-
patch(overlay.id, props)
92+
overlay.props = { ...overlay.originalProps, ...props }
9393
} else {
94-
patch(overlay.id, overlay.originalProps)
94+
overlay.props = { ...overlay.originalProps }
9595
}
9696

9797
overlay.isOpen = true

0 commit comments

Comments
 (0)