Skip to content

Commit

Permalink
fix(Gallery): Should update thumbnails when maxRows changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonC committed Jul 20, 2017
1 parent 7c2dbfc commit 16b0ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Gallery extends Component {
}

componentWillReceiveProps (np) {
if(this.state.images != np.images){
if(this.state.images != np.images || this.props.maxRows != np.maxRows){
this.setState({
images: np.images,
thumbnails: this.renderThumbs(this._gallery.clientWidth,
Expand Down

0 comments on commit 16b0ee7

Please sign in to comment.