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
Nice Work with PhotoSwipe!
I want to include a button in the caption that executes a function when clicked. Unfortunately, the "onClick" is not being executed.
<div className="pswp-caption-content">
<button onClick={() => handlerClick()}>Click</button>
<div>
<Text size="xl" weight={700}>
Lorem ipsum dolor (1933)
</Text>
</div>
Color photograph 12 x 10
</div>
Does anyone have an idea of how it could work?
The text was updated successfully, but these errors were encountered:
Oh, I see! Thanks! Now I understand. The elements are reset through innerHTML and are no longer connected to the original DOM, which is why my JSX onClick directive is no longer handled. Is there a workaround for that? So that the button works as it is without having to reset it through lightbox.on, or is it possible to reference this button?
Nice Work with PhotoSwipe!
I want to include a button in the caption that executes a function when clicked. Unfortunately, the "onClick" is not being executed.
Does anyone have an idea of how it could work?
The text was updated successfully, but these errors were encountered: