Fix #6874 - Grid column resize
[roojs1] / Roo / bootstrap / Table / RowSelectionModel.js
index 7502ccb..eaf7c33 100644 (file)
@@ -1,11 +1,8 @@
 
 /**
- * @extends Roo.bootstrap.Table.AbstractSelectionModel
- * @class Roo.bootstrap.Table.RowSelectionModel
- * The default SelectionModel used by {@link Roo.bootstrap.Table}.
- * It supports multiple selections and keyboard selection/navigation. 
- * @constructor
- * @param {Object} config
+ *  @deprecated
+ *
+ *  
  */
 
 Roo.bootstrap.Table.RowSelectionModel = function(config){
@@ -110,6 +107,9 @@ Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSe
             },
             scope: this
         });
+        this.grid.store.on('load', function(){
+            this.selections.clear();
+        },this);
         /*
         var view = this.grid.view;
         view.on("refresh", this.onRefresh, this);
@@ -306,7 +306,7 @@ Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSe
     
         }else{
             var isSelected = this.isSelected(rowIndex);
-            Roo.log("select row:" + rowIndex)
+            //Roo.log("select row:" + rowIndex);
             if(isSelected){
                 this.deselectRow(rowIndex);
             } else {
@@ -437,7 +437,10 @@ Roo.extend(Roo.bootstrap.Table.RowSelectionModel, Roo.bootstrap.Table.AbstractSe
         }
        
         var r = this.grid.store.getAt(index);
-        //var r = this.grid.dataSource.getAt(index);
+        if (!r) {
+            return;
+        }
+        
         this.selections.remove(r);
         //.console.log('deselectRow - record id :' + r.id);
         if(!preventViewNotify){