Use underscore's indexOf() and filter() rather than relying on native versions. Issue #323.
This commit is contained in:
parent
56a8b64f81
commit
28052c2717
@ -118,7 +118,7 @@ my.SlickGrid = Backbone.View.extend({
|
||||
});
|
||||
|
||||
// Restrict the visible columns
|
||||
var visibleColumns = columns.filter(function(column) {
|
||||
var visibleColumns = _.filter(columns, function(column) {
|
||||
return _.indexOf(self.state.get('hiddenColumns'), column.id) === -1;
|
||||
});
|
||||
|
||||
@ -164,7 +164,7 @@ my.SlickGrid = Backbone.View.extend({
|
||||
this.getItem = function(index) {return rows[index];};
|
||||
this.getItemMetadata = function(index) {return {};};
|
||||
this.getModel = function(index) {return models[index];};
|
||||
this.getModelRow = function(m) {return models.indexOf(m);};
|
||||
this.getModelRow = function(m) {return _.indexOf(models, m);};
|
||||
this.updateItem = function(m,i) {
|
||||
rows[i] = toRow(m);
|
||||
models[i] = m;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user