Browse Source
fix: resolve onClosed method failure in connectedComponent of useVbenModal (#6309)
pull/6327/head
huanghezhen
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
packages/@core/ui-kit/popup-ui/src/modal/use-modal.ts
|
|
|
@ -94,8 +94,9 @@ export function useVbenModal<TParentModalProps extends ModalProps = ModalProps>( |
|
|
|
injectData.options?.onOpenChange?.(isOpen); |
|
|
|
}; |
|
|
|
|
|
|
|
const onClosed = mergedOptions.onClosed; |
|
|
|
mergedOptions.onClosed = () => { |
|
|
|
options.onClosed?.(); |
|
|
|
onClosed?.(); |
|
|
|
if (mergedOptions.destroyOnClose) { |
|
|
|
injectData.reCreateModal?.(); |
|
|
|
} |
|
|
|
|