code: function getSelectedRows(firstSelectedCell, rangeInformation, $table) {
    const tbodyRowLength = $table.find('tbody tr').length;
    const isStartContainerInThead = $(firstSelectedCell).parents('thead').length;
    let startRowIndex = rangeInformation.from.row;
    let endRowIndex = rangeInformation.to.row;
  
    if (isStartContainerInThead) {
      startRowIndex += 1;
    }
  
    const isWholeTbodySelected = (startRowIndex === 1 || isStartContainerInThead) && endRowIndex === tbodyRowLength;
  
    if (isWholeTbodySelected) {
      endRowIndex -= 1;
    }
  
    return $table.find('tr').slice(startRowIndex, endRowIndex + 1);
  }
docs: Get start, end row index from current range
  @param {HTMLElement} firstSelectedCell Range object
  @param {object} rangeInformation Range information object
  @param {jQuery} $table jquery wrapped TABLE
  @returns {jQuery}