getRowChunks(groups, rows) {
    const [, chunks] = groups.reduce(
      ([startIndex, acc], size) => {
        const endIndex = startIndex + size;
        return [endIndex, [...acc, [startIndex, endIndex]]];
      }, [0, []]
    );
    return chunks.map(range => _.slice(rows, ...range));
  }
Split rows into chunks.
@param {number[]} groups - array of numbers where each item is size of group
@param {Array<T>} rows - rows collection
@returns {Array<T[]>} - The chunked rows