Skip to content

Releases: neptunian/react-photo-gallery

v8

01 Jul 01:22
Compare
Choose a tag to compare
  • Gallery uses React.memo
  • Use hooks
  • Update examples
  • Update tests
  • Bump default limitNodeSearch to 2
  • Change the way renderImage works. You now need to pass in your own key. The component is no longer wrapped in a div with a key.

Possible breaking changes

  • if your are using a custom component (renderImage prop), you may get a warning about keys. It could also stop interacting correctly with other libraries that use an HOC.
  • the Gallery uses React.memo. That means it does a shallow update of props. If you are mutating your photos array directly, it will no longer trigger a change. You will need to make sure your prop values are immutable if you want them to trigger Gallery updates.

v7.0.0

20 Apr 16:06
da0a70e
Compare
Choose a tag to compare

Breaking Changes

  • New algorithm being used which ignores columns prop when direction=row (default). Photos per row are now determined by the new algorithm keeping in mind the user defined targetRowHeight.
  • ImageComponent renamed to renderImage
  • targetRowHeight. New prop. The algorithm will do its best to keep rows close to this height
  • limitNodeSearch. New prop. Limits the amount of neighboring nodes to check for the best row

v6.3.2

20 Apr 16:01
Compare
Choose a tag to compare
  • Add Typescript def file thanks to @vadistic

v6.3.0

31 Dec 23:14
Compare
Choose a tag to compare
  • pr #124 - columns prop can be a function that returns width of Gallery
  • upgrade to Babel 7

v6.2.2

23 Nov 02:51
Compare
Choose a tag to compare

v6.2.1

05 Sep 18:20
Compare
Choose a tag to compare
  • fix unnecessary rendering by only calling observer callback if the width has changed
  • return render early when no container width to save on calculations (because no container width on first render)

v6.2.0

14 Aug 19:28
Compare
Choose a tag to compare
  • Makes columns prop optional and provide default columns at breakpoints based on Gallery's size

v6.1.6

13 Aug 14:32
Compare
Choose a tag to compare
  • Allow columns property number to be less than photos.length

v6.1.3

11 Aug 13:49
Compare
Choose a tag to compare
  • Address issue #103. Do not stretch images across last rows when photos left is less than column number
  • Add type restriction to columns so that it cannot be greater than the length of photos

v6.1.0

02 Aug 11:08
Compare
Choose a tag to compare
  • Add feature to let user choose between column (masonry) or row (default) based layout.