Skip to content

Commit 361bb06

Browse files
authored
feat: wrapCollectionLayout preserves storyLimit (#110)
1 parent 70c3358 commit 361bb06

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/wrap-collection-layout.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ function WrapCollectionComponent(Component) {
7575
* @returns {Component} A component which can be passed collection
7676
*/
7777
export function wrapCollectionLayout(component) {
78-
return connect((state) => ({config: state.qt.config}))(WrapCollectionComponent(component))
78+
const wrappedComponent = connect((state) => ({config: state.qt.config}))(WrapCollectionComponent(component));
79+
if(component.storyLimit) {
80+
wrappedComponent.storyLimit = component.storyLimit;
81+
}
82+
return wrappedComponent;
7983
}
8084

8185
/**

0 commit comments

Comments
 (0)