docs: function(groupLevel, direction, columnIndex) {
          switch (direction) {
              case 0:
                  this.clearIndex();
                  break;
  
              case undefined:
              case 1:
              case -1:
                  if (this.dataSource.getRowCount()) {
                      var getValue;
  
                      this.buildIndex();
  
                      // used in getValue:
                      this.depth = 0;
                      this.edge = direction === -1 ? +Infinity : -Infinity; // for numbers, date objects
  
                      if (columnIndex === undefined) {
                          getValue = getRowIndex.bind(this);
                      } else {
                          getValue = getColumnValue.bind(this);
                          this.columnName = this.dataSource.getFields()[columnIndex];
                          this.calculator = this.dataSource.getProperty('calculators')[columnIndex];
                          if (typeof getValue(0) === 'string') {
                              this.edge = direction === -1 ? '\uffff' : ''; // for strings
                          }
                      }
  
                      this.depth = groupLevel;
                      stableSort.sort(this.index, getValue, direction);
                  }
                  break;
          }
      }