Sha256: 9d95e2cedddcb0e333c28b5b519297d8bbf3159c5f558ef9025d6a64a1af1c41

Contents?: true

Size: 768 Bytes

Versions: 76

Compression:

Stored size: 768 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, label, checked, onChange, ...props }) => (
  <Table.SelectionCell>
    <Table.Checkbox
      id={id}
      label={label}
      checked={checked}
      onChange={onChange}
      {...props}
    />
  </Table.SelectionCell>
);

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

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

export default TableSelectionCell;

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
foreman-tasks-10.0.2 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-10.0.1 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-10.0.0 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.2.3 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.2.2 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.2.1 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.2.0 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.1.1 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.0.4 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.1.0 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.0.2 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.0.1 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.3.3 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-9.0.0 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.2.1 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.1.4 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.3.2 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.3.1 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.1.3 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js
foreman-tasks-8.3.0 webpack/ForemanTasks/Components/TasksTable/Components/TableSelectionCell.js