From 56b50e3e60349e9c9a65a83159c1475481b3700a Mon Sep 17 00:00:00 2001 From: victorhmp Date: Tue, 27 Aug 2019 20:02:21 -0300 Subject: [PATCH 1/3] Use user-provided `itemsPerPage` on desktop --- react/components/ShelfContent.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/react/components/ShelfContent.js b/react/components/ShelfContent.js index 69ae36c4..a9c2885a 100644 --- a/react/components/ShelfContent.js +++ b/react/components/ShelfContent.js @@ -86,6 +86,7 @@ class ShelfContent extends Component { gap, arrows, summary, + itemsPerPage, minItemsPerPage, paginationDotsVisibility, isMobile, @@ -103,13 +104,14 @@ class ShelfContent extends Component { !products || !products.length ? Array(maxItems).fill(null) : products const roundedMinItems = this.roundHalf(minItemsPerPage) + const customPerPage = !isMobile && itemsPerPage return (
Date: Tue, 27 Aug 2019 20:02:32 -0300 Subject: [PATCH 2/3] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c04318f0..b92d521f 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ For `RelatedProducts`: | `summary` | `Object` | Product Summary schema properties. | - | | `gap` | `Enum` | Gap between items. Possible values: `ph0`, `ph3`,`ph5`, `ph7`. | `ph3` | | `minItemsPerPage` | `Number` | Minimum amount of slides to be on the screen, can be used to control how many itens will be displayed in the smallest screen size. This value can be a **Float**, which should be a multiple of 0.5 and would indicate that you want to show a "peek" of the next item in the Shelf. | `1` | -| `itemsPerPage` | `Number` | Maximum amount of slides to be on the screen. Can be used to control how many items will be displayed in the biggest screen size. This value needs to be an **Integer**. | `5` | +| `itemsPerPage` | `Number` | Maximum amount of slides to be on the screen. Can be used to control how many items will be displayed in the biggest screen size. This value can be a **Float**, which should be a multiple of 0.5 and would indicate that you want to show a "peek" of the next item in the Shelf. | `5` | For `TabbedShelf`: From 15a10ec1d765f0912b19b6691993c927edd2b868 Mon Sep 17 00:00:00 2001 From: victorhmp Date: Tue, 27 Aug 2019 20:04:41 -0300 Subject: [PATCH 3/3] Update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81d59ff0..3195e2e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- `itemPerPage` would not be taken into consideration if its value was greater than 5, as this limit was set in the `ShelfContent` component. ## [1.28.0] - 2019-08-16 ### Added