Sha256: 96cdcc7e6a97abaa4de9558f40b8b44c339ed3b7577d8aa84ae4a49c95035ddf

Contents?: true

Size: 832 Bytes

Versions: 30

Compression:

Stored size: 832 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { Table } from 'patternfly-react';
import { noop } from 'foremanReact/common/helpers';

const TableSelectionCell = ({
  id, before, after, label, checked, onChange, ...props
}) => (
  <Table.SelectionCell>
    {before}
    <Table.Checkbox
      id={id}
      label={label}
      checked={checked}
      onChange={onChange}
      {...props}
    />
    {after}
  </Table.SelectionCell>
);

TableSelectionCell.propTypes = {
  id: PropTypes.string.isRequired,
  before: PropTypes.node,
  after: PropTypes.node,
  label: PropTypes.string,
  checked: PropTypes.bool,
  onChange: PropTypes.func,
};

TableSelectionCell.defaultProps = {
  before: null,
  after: null,
  label: __('Select row'),
  checked: false,
  onChange: noop,
};

export default TableSelectionCell;

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
katello-3.12.3 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.12.2 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.12.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.11.2 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.10.2 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.12.0 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.12.0.rc2 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.10.1.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.12.0.rc1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.10.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.11.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.11.0 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.11.0.rc2 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.11.0.rc1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.10.0 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.10.0.rc1.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.9.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.10.0.rc1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.9.0 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js
katello-3.8.1 webpack/move_to_foreman/components/common/table/components/TableSelectionCell.js