Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix(CModal): disable emitting the onClose event twice
  • Loading branch information
mrholek committed Jan 3, 2025
commit e457ffe325d1a91e5e4f36ebd00870edaaacc953
3 changes: 1 addition & 2 deletions packages/coreui-react/src/components/modal/CModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,12 @@ export const CModal = forwardRef<HTMLDivElement, CModalProps>(
}, [_visible])

const handleDismiss = () => {
console.log('handleDismiss')
if (backdrop === 'static') {
return setStaticBackdrop(true)
}

setVisible(false)

return onClose && onClose()
}

useLayoutEffect(() => {
Expand Down