Sha256: 46bde6429dc8eb82a357de4a8d19fff68eead2ee9259d22b18500554b2564b85

Contents?: true

Size: 673 Bytes

Versions: 126

Compression:

Stored size: 673 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Table as PfTable } from 'patternfly-react';

import TableBodyMessage from './TableBodyMessage';

const TableBody = ({
  columns, rows, message, ...props
}) => {
  if (message) {
    return <TableBodyMessage colSpan={columns.length}>{message}</TableBodyMessage>;
  }

  return <PfTable.Body rows={rows} rowKey={({ rowIndex }) => rowIndex} {...props} />;
};

TableBody.propTypes = {
  columns: PropTypes.arrayOf(PropTypes.object).isRequired,
  rows: PropTypes.arrayOf(PropTypes.object).isRequired,
  message: PropTypes.string,
};

TableBody.defaultProps = {
  message: '',
};

export default TableBody;

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
katello-3.15.0.rc1.3 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.15.0.rc1.2 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.15.0.rc1.1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.15.0.rc1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.14.1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.4 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.14.0 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.3 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.14.0.rc2 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.2 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.14.0.rc1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.0 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.0.rc2.1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.0.rc2 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.12.3 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.12.2 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.13.0.rc1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.12.1 webpack/move_to_foreman/components/common/table/components/TableBody.js
katello-3.11.2 webpack/move_to_foreman/components/common/table/components/TableBody.js