Releases: benhowell/react-grid-gallery
Releases · benhowell/react-grid-gallery
v0.2.6
v0.2.5
- Added image tagging functionality. Optional
tags
prop takes an array of objects containing tag attributes.value
prop is the text shown on the tag andtitle
prop is the text shown when hovering over the tag.
e.g. tags: [{value: "Ocean", title: "Ocean"}, {value: "People", title: "People"}]
v0.2.4
v0.2.3
- Image selection state now handled within image object by optional boolean prop
isSelected
. This greatly reduces complexity both within and outside the component as the image itself carries it's selected state. ThereforeselectedImages
prop has been removed. onSelectedImagesChange
prop removed due to the changes outlined above.- Optional
onImageSelected
prop added. This prop takes a function and an optional image object as a parameter. isSelected
removed as first class prop on Image (now a prop on the image item passed in)- Image
onToggleSelected
renamed toonImageSelected
.
v0.2.2
v0.2.1
- Fixes Bug 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 for the pull request which fixes this issue by assigning src attribute as key.
- Fixes bug where only thumbnails are updated when images props changes, meaning re-render doesn't happen until window is resized. Thanks again to cust0dian for the pull request which fixes this issue.
v0.2.0
- Construction of thumbnail images and image rows removed from render. Thumbnails and rows now only rebuilt when container size changes.
selectedImages
state now set via props change.onSelectedImagesChange
callback now called directly fromonToggleSelected
rather thancomponentWillUpdate
. Perviously, a combination of settingselectedImages
state and triggeringonSelectedImagesChange
whencomponentWillUpdate
due to that state change caused a double render.- Internal image access now via state instead of props.
- Thumbnail generation now atomic function rather than whole array at once.