You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following, when clicking on the element I pass open to (for its onClick handler), the badge is still shown until I refresh the page:
constAnnounceKitBadge=({ children })=>{constannounceKitRef=useRef<AnnounceKit>();constopen=async()=>awaitannounceKitRef?.current?.open();constAnnounceKitElement=(<AnnounceKitwidget={'myurl'}ref={announceKitRef}/>);returnchildren({ open, AnnounceKitElement });};
It will only disappear as expected if I were to click directly on the small circle badge instead of clicking on the element I pass the open function to as an onClick handler. This ref usage is in the example codesandbox so I'd expect it to work.
When I use catchClick and pass a selector instead of the onClick event handler, then clicking on the element I pass the selector to will make the badge disappear upon open as expected..
A related issue is passing children to AnnounceKit isn't well supported since there is no way to override the styles, the display: inline is hardcoded. Passing widgetStyle doesn't help either.
I'm using version 2.1.7.
The text was updated successfully, but these errors were encountered:
stephan-noel-primer
changed the title
AnnounceKit badge doesn't disappear when ref is used
AnnounceKit badge doesn't disappear on click when ref is used
Jan 28, 2022
The following, when clicking on the element I pass
open
to (for its onClick handler), the badge is still shown until I refresh the page:It will only disappear as expected if I were to click directly on the small circle badge instead of clicking on the element I pass the open function to as an onClick handler. This ref usage is in the example codesandbox so I'd expect it to work.
When I use
catchClick
and pass a selector instead of theonClick
event handler, then clicking on the element I pass the selector to will make the badge disappear upon open as expected..A related issue is passing children to AnnounceKit isn't well supported since there is no way to override the styles, the
display: inline
is hardcoded. PassingwidgetStyle
doesn't help either.I'm using version 2.1.7.
The text was updated successfully, but these errors were encountered: