Sha256: b1480359aef38890ca5797b47c0c39481f8412fc2c96bcb44c69c959c4ae0c95

Contents?: true

Size: 952 Bytes

Versions: 152

Compression:

Stored size: 952 Bytes

Contents

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

const TableSelectionCell = ({
  id, before, after, label, checked, hide, onChange, ...props
}) => (
  <Table.SelectionCell>
    {before}
    {!hide &&
    <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,
  hide: PropTypes.bool,
  onChange: PropTypes.func,
};

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

export default TableSelectionCell;

Version data entries

152 entries across 152 versions & 1 rubygems

Version Path
katello-4.14.2 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.15.0 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.15.0.rc2 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.15.0.rc1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.14.1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.14.0 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.14.0.rc3 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.14.0.rc2 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.14.0.rc1.1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.14.0.rc1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.13.1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.13.0 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.12.1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.13.0.rc1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.12.0 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.12.0.rc3 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.12.0.rc2 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.12.0.rc1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.11.1 webpack/components/pf3Table/components/TableSelectionCell.js
katello-4.11.0 webpack/components/pf3Table/components/TableSelectionCell.js