fix(useOverlay): improve props handling by merging existing and new (#4478)

This commit is contained in:
Eugen Istoc
2025-07-08 04:51:34 -04:00
committed by GitHub
parent da05c37ffe
commit 6519a74de4

View File

@@ -71,7 +71,7 @@ function _useOverlay() {
isMounted: !!defaultOpen,
destroyOnClose: !!destroyOnClose,
originalProps: props || {},
props: { ...(props || {}) }
props: { ...props }
})
overlays.push(options)
@@ -135,7 +135,7 @@ function _useOverlay() {
const patch = <T extends Component>(id: symbol, props: Partial<ComponentProps<T>>): void => {
const overlay = getOverlay(id)
overlay.props = { ...props }
overlay.props = { ...overlay.props, ...props }
}
const getOverlay = (id: symbol): Overlay => {