I have a data grid made of table. I need to select all rows in that table.
I am using mirage for fetching data.
I have a data grid made of table. I need to select all rows in that table.
I am using mirage for fetching data.
Can you be more specific?
Do you want a checkbox that when checked selects all rows in a table?
yes i need that kind of checkbox. could you help me
I got this from stack overflow
My router:
export default Ember.Route.extend(AuthenticatedRouteMixin, {
model: function() {
return $.getJSON(ENV.apiHost + "/api/forum/user/all");
},
afterModel: function(model) {
model['entities'].setEach('isDrop', false);
}, …
And my controler:
export default Ember.ObjectController.extend({ selected: false,
isDrop: false,
allChecked: null, allCheckedWatcher: function(){ var model = this.get(‘model’); if(this.get(‘allChecked’) === true){
model['entities'].setEach('isDrop', true);
} else {
model['entities'].setEach('isDrop', false);
}
}.observes(‘allChecked’),
but I am getting Uncaught TypeError: Cannot read property ‘employee’ of undefined this error
and my model name is employee
and what is the use od afterModel() in router