code: function replaceTable($table, tableData) {
    const cellIndexData = tableDataHandler.createCellIndexData(tableData);
    const renderData = tableDataHandler.createRenderData(tableData, cellIndexData);
    const $newTable = $(createTableHtml(renderData));
  
    $table.replaceWith($newTable);
  
    return $newTable;
  }
docs: Replace table.
  @param {jQuery} $table - table jQuery element
  @param {Array.<Array.<object>>} tableData - table data
  @returns {jQuery}
  @ignore