Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery shows nothing in a modal. #366

Open
Vin-dellavv opened this issue Jun 10, 2024 · 1 comment
Open

Gallery shows nothing in a modal. #366

Vin-dellavv opened this issue Jun 10, 2024 · 1 comment

Comments

@Vin-dellavv
Copy link

Vin-dellavv commented Jun 10, 2024

Expected behaviour

Being able to utilize the gallery in a modal (like zendesk garden one).

Actual behaviour

Only in the modal the Gallery component does not show any images.
I suspect in line 46 thumbnails is an empty array so thumbnails.map returns nothing because buildLayoutFlat -> buildLayout exits early on line 95.

Steps to reproduce behaviour

Here's a sandbox to reproduce it

Browser and version

Browsers: all,
Version: "react-grid-gallery": "^1.0.1"

@marulka
Copy link

marulka commented Jun 21, 2024

Try to add some width to the container using CSS, or set drfaultContainerWidth prop to some value. Note: This is a workaround. The defaultContainerWidth should be set to some adequate minimum positive value, rather than 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants