Skip to content

Releases: benhowell/react-grid-gallery

v0.2.6

25 Oct 10:52
Compare
Choose a tag to compare

v0.2.5

26 Sep 09:21
Compare
Choose a tag to compare
  • Added image tagging functionality. Optional tags prop takes an array of objects containing tag attributes. value prop is the text shown on the tag and title prop is the text shown when hovering over the tag.

e.g. tags: [{value: "Ocean", title: "Ocean"}, {value: "People", title: "People"}]

v0.2.4

17 Sep 03:40
Compare
Choose a tag to compare
  • onImageSelected prop function now takes two optional args, index (index of selected image in images array) and image (the selected image object).

v0.2.3

16 Sep 11:00
Compare
Choose a tag to compare
  • 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. Therefore selectedImages 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 to onImageSelected.

v0.2.2

11 Sep 00:05
Compare
Choose a tag to compare
  • Fixes bug 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

10 Sep 23:32
Compare
Choose a tag to compare
  • 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

03 Sep 01:56
Compare
Choose a tag to compare
  • 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 from onToggleSelected rather than componentWillUpdate. Perviously, a combination of setting selectedImages state and triggering onSelectedImagesChange when componentWillUpdate 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.

v0.1.14

22 Aug 12:25
Compare
Choose a tag to compare
  • selectedImages state set on componentWillReceiveProps allowing selections from outside component to trigger state update.

v0.1.13

22 Aug 04:35
Compare
Choose a tag to compare
  • Replaced legacy ref string with ref callback. Fixes unsupported stringy ref issue when using react-grid-gallery inside a reagent project :)

v0.1.12

22 Aug 02:28
Compare
Choose a tag to compare
  • Replaced ReactDOM.findDOMNode(this) with ref, removed react-dom deps
  • Added conditional to ensure image onClick not fired when no function specified
  • Moved CheckButton styling (color, hoverColor, selectedColor) to props