fixed paging on subcategory browsing page

This commit is contained in:
Edin Dazdarevic
2015-03-30 00:05:57 +02:00
parent 7c1eb2f4fd
commit 76d5fd7599
5 changed files with 33 additions and 18 deletions

View File

@@ -23,6 +23,9 @@ var BySubCategory = React.createClass({
removeAppliedFilter: function(name) {
BySubCategoryActions.removeAppliedFilter(name);
},
onChangePage: function(page) {
BySubCategoryActions.changePage(page);
},
render : function() {
return (<div>
@@ -32,14 +35,17 @@ var BySubCategory = React.createClass({
</div>
<div classname='col-md-10'>
<h2>
Podkategorija {this.state.subCategory.get('name')}
</h2>
Number of items in this subcategory: {this.state.items.length}
<div>Number of items in this subcategory: {this.state.items.length}</div>
<div>total count : {this.state.items.totalCount}</div>
<div>
<AppliedFiltersList filters={this.appliedSubCategoryFiltersArray()} onRemove={this.removeAppliedFilter} />
</div>
<ItemList items={this.state.items} paginationEnabled={true} total={this.state.items.totalCount} limit={this.state.pagination.limit} onPageChange={this.changePage} currentOffset={this.state.pagination.offset} />
<ItemList items={this.state.items} paginationEnabled={true} total={this.state.items.totalCount} limit={this.state.pagination.limit} onPageChange={this.onChangePage} currentOffset={this.state.pagination.offset} />
</div>
</div>)
},