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);
}
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);
}
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 ) ; }
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}
Get start end row index from current range
Get selected rows