benhowell/react-grid-gallery

Close lightbox on click of a custom control button

amitnjha opened this issue · 1 comments

Expected behaviour

I am looking for a way to close the lightbox on click of custom control button.
It does not look like there is one or maybe I am missing something?

Actual behaviour

On click of button, I am trying to show a dialog. The dialog does show up, but it's hidden by the lightbox.

Steps to reproduce behaviour

  • Navigate to https://aditijha.org/library
  • Click on any thumbnail. This should open the lightbox with book details along with a Borrow Me button on top left.
  • When you click on Borrow Me, a dialog will show up but the lightbox stays open. I would like the lightbox to disappear.

Operating system

MacOS 10.15.6

Browser and version

86.0.4240.111

Hardware

I was able to resolve this by using React.createRef(). So closing this issue!