Roo/grid/RowSelectionModel.js
authorAlan Knowles <alan@roojs.com>
Wed, 20 Apr 2016 09:56:14 +0000 (17:56 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 20 Apr 2016 09:56:14 +0000 (17:56 +0800)
Roo/grid/RowSelectionModel.js

index 334f3f0..ab87cce 100644 (file)
@@ -378,7 +378,9 @@ Roo.extend(Roo.grid.RowSelectionModel, Roo.grid.AbstractSelectionModel,  {
      * @param {Boolean} keepExisting (optional) True to keep existing selections
      */
     selectRow : function(index, keepExisting, preventViewNotify){
-        if(this.locked || (index < 0 || index >= this.grid.dataSource.getCount())) return;
+        if(this.locked || (index < 0 || index >= this.grid.dataSource.getCount())) {
+            return;
+        }
         if(this.fireEvent("beforerowselect", this, index, keepExisting) !== false){
             if(!keepExisting || this.singleSelect){
                 this.clearSelections();
@@ -399,7 +401,9 @@ Roo.extend(Roo.grid.RowSelectionModel, Roo.grid.AbstractSelectionModel,  {
      * @param {Number} row The index of the row to deselect
      */
     deselectRow : function(index, preventViewNotify){
-        if(this.locked) return;
+        if(this.locked) {
+            return;
+        }
         if(this.last == index){
             this.last = false;
         }