[#392] preventDefault on grid after row deletion
This commit is contained in:
@@ -313,13 +313,15 @@ my.SlickGrid = Backbone.View.extend({
|
|||||||
model.set(v);
|
model.set(v);
|
||||||
});
|
});
|
||||||
this._slickHandler.subscribe(this.grid.onClick,function(e, args){
|
this._slickHandler.subscribe(this.grid.onClick,function(e, args){
|
||||||
|
//try catch , because this fail in qunit , but no
|
||||||
|
//error on browser.
|
||||||
|
try{e.preventDefault()}catch(e){}
|
||||||
if (args.cell == 0 && self.state.get("gridOptions").enabledDelRow == true){
|
if (args.cell == 0 && self.state.get("gridOptions").enabledDelRow == true){
|
||||||
// We need to delete the associated model
|
// We need to delete the associated model
|
||||||
var model = data.getModel(args.row);
|
var model = data.getModel(args.row);
|
||||||
model.destroy()
|
model.destroy()
|
||||||
}
|
}
|
||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
var columnpicker = new Slick.Controls.ColumnPicker(columns, this.grid,
|
var columnpicker = new Slick.Controls.ColumnPicker(columns, this.grid,
|
||||||
_.extend(options,{state:this.state}));
|
_.extend(options,{state:this.state}));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user