changed itemcollection to support filtering by traits
This commit is contained in:
@@ -25,7 +25,6 @@ var ByCategory = React.createClass({
|
||||
|
||||
var q = {};
|
||||
q[fc.field_name] = fcv.filter_value;
|
||||
// TODO: fix this, clean this up
|
||||
var section = new Section(this.state.category.get('section'));
|
||||
var category = this.state.category;
|
||||
NavigationActions.goToCategory(category, section, q)
|
||||
@@ -70,12 +69,13 @@ var ByCategory = React.createClass({
|
||||
},
|
||||
componentWillReceiveProps: function() {
|
||||
var categoryId = this.getParams().id;
|
||||
ItemActions.loadByCategory(categoryId);
|
||||
ItemActions.loadByCategory(categoryId, this.getQuery());
|
||||
CategoryActions.loadCategoryDetails(categoryId);
|
||||
},
|
||||
componentDidMount: function() {
|
||||
var categoryId = this.getParams().id;
|
||||
ItemActions.loadByCategory(categoryId);
|
||||
ItemActions.loadByCategory(categoryId, this.getQuery());
|
||||
|
||||
CategoryActions.loadCategoryDetails(categoryId);
|
||||
|
||||
ItemStore.addChangeListener(this._onChange);
|
||||
|
||||
Reference in New Issue
Block a user