Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e7ee210

Browse filesBrowse files
committed
feat(CPopover): make visible property reactive.
1 parent 10a1aad commit e7ee210
Copy full SHA for e7ee210

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎packages/coreui-react/src/components/popover/CPopover.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/popover/CPopover.tsx
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { usePopper } from 'react-popper'
77
import { Transition } from 'react-transition-group'
88

99
import { Triggers, triggerPropType } from '../Types'
10+
import { useEffect } from 'react'
1011

1112
export interface CPopoverProps {
1213
// TODO: find solution to not use any
@@ -78,6 +79,10 @@ export const CPopover: FC<CPopoverProps> = ({
7879
placement: placement,
7980
})
8081

82+
useEffect(() => {
83+
setVisible(visible)
84+
}, [visible])
85+
8186
const getTransitionClass = (state: string) => {
8287
return state === 'entering'
8388
? 'fade'

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.