Skip to content

Commit 2480a8a

Browse files
Merge pull request #5 from bayareawebpro/collections
Update Collection.js
2 parents 343930e + 415d995 commit 2480a8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Support/Collection.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ class Collection {
151151
* @return void
152152
*/
153153
set perPage(value) {
154-
this.setState({
155-
per_page: this.get('per_page_options').includes(value) ? value : 1,
156-
current_page: 0
157-
})
154+
this.setState(Object.assign(this.state, {
155+
per_page: this.perPageOptions.includes(value) ? value : 1,
156+
current_page: 1
157+
}))
158158
}
159159
/**
160160
* (Getter) itemCount

0 commit comments

Comments
 (0)