I have multiple folders with corresponding items, in that having search option. If I clicked the checkbox on folder A in the search option, it will show their items (eg. consider it having 4 items) and If I click the another checkbox of folder B (eg. consider it having 4 items) along with the folder A, it will show totally 8 items of folder A and folder B. Now When I remove the folder A or folder B from the checkbox, it still showing the 8 items. But I need only the corresponding folder items selected.
Here are my code:
Checkbox: Core.component.Checkbox.extend({
click: function () {
console.log(this);
var nav = this.get("controller").get('selectedNavigator');
var ret = this._super.apply(this, arguments);
Ember.run.schedule('sync', this, function () {
Ember.run.schedule('render', this, function () {
var states = this.get('parentView.itemStates');
var values = Object.keys(states).filter(function (key) {
return states[key];
});
if (values.length === 0) {
Core.Action('core:contentHome', {});
} else {
this.set('parentView.model.values',values);
nav.publish();
}
});
});
return ret;
}
})
Please provide me suggest on this. I'm using Ember 1.4.0. If you need any further file also ask in comment. I'll provide. I'm new to the ember. Your help will be appreciate. Thanks in advance
Aucun commentaire:
Enregistrer un commentaire