Skip to content

Commit ea59499

Browse files
authored
Merge pull request #35 from SimeonC/fix-change-maxRows
fix(Gallery): Should update thumbnails when maxRows changes This fix checks new props for change in maxRows.
2 parents 7c2dbfc + 16b0ee7 commit ea59499

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Gallery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Gallery extends Component {
3131
}
3232

3333
componentWillReceiveProps (np) {
34-
if(this.state.images != np.images){
34+
if(this.state.images != np.images || this.props.maxRows != np.maxRows){
3535
this.setState({
3636
images: np.images,
3737
thumbnails: this.renderThumbs(this._gallery.clientWidth,

0 commit comments

Comments
 (0)