Skip to content

Commit

Permalink
v0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
benhowell committed Sep 11, 2016
1 parent 6a6e6f4 commit 8f651ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# react-grid-gallery

### v0.2.2 / 2016-09-11

* Fixes [bug](https://github.com/benhowell/react-grid-gallery/issues/8) on small edge case whereby duplicate images causes an error (two children cannot have the same key) and subsequently only the first of any repeated image src can be rendered.

### v0.2.1 / 2016-09-11

* Fixes [Bug](https://github.com/benhowell/react-grid-gallery/pull/7) where updating an image caused wrong aspect due to thumb not resizing. Bug caused by using array index as react key rather than something unique to the image. Thanks to [cust0dian](https://github.com/cust0dian) for the [pull request](https://github.com/benhowell/react-grid-gallery/pull/7) which fixes this issue by assigning src attribute as key.
Expand Down
2 changes: 1 addition & 1 deletion lib/Gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ var Gallery = function (_Component) {

var images = this.state.thumbnails.map(function (item, idx) {
return _react2.default.createElement(_Image2.default, {
key: item.src,
key: "Image-" + idx + "-" + item.src,
item: item,
index: idx,
margin: _this2.props.margin,
Expand Down
2 changes: 1 addition & 1 deletion lib/react-grid-gallery.bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-grid-gallery",
"version": "0.2.1",
"version": "0.2.2",
"description": "Justified gallery component for React.",
"main": "lib/Gallery.js",
"dependencies": {
Expand Down

0 comments on commit 8f651ab

Please sign in to comment.