-
Notifications
You must be signed in to change notification settings - Fork 311
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
Dynamic columns as a function prop #124
Conversation
bf8e878
to
44b7177
Compare
44b7177
to
2c613c4
Compare
Also removed the Ideally projects should use either a For example if you currently try and |
<Gallery photos={photos} onClick={handleClick} direction={'column'}/> | ||
); | ||
wrapper.setState({containerWidth: '1139'}) | ||
wrapper.setState({containerWidth: 1139}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed these setStates
were setting the width as a string, which doesn't seem correct, so i've updated them.
Great idea! I was thinking instead of creating a new Code Sandbox example we can just adjust this already existing one to stop using the Measure component: https://codesandbox.io/s/ll7ym48027 . I can change it after it's published. |
@neptunian code sandbox examples removed, thanks! 👍 |
Quick feature request, this makes it much easier/quicker to provide dynamic column counts without needing to measure the container in user-code. I think this is a nice interface and feels appropriate given
react-photo-gallery
is already doing the measurement.I've bumped the minor version to indicate new functionality which should be non-breaking.