Sha256: 01474e071a36049e93ed165a439825b4d7e9156829947869b60a059fddefdbf0

Contents?: true

Size: 761 Bytes

Versions: 75

Compression:

Stored size: 761 Bytes

Contents

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

const TableSelectionHeaderCell = ({
  id,
  label,
  checked,
  onChange,
  ...props
}) => (
  <Table.SelectionHeading aria-label={label}>
    <Table.Checkbox
      id={id}
      label={label}
      checked={checked}
      onChange={onChange}
      {...props}
    />
  </Table.SelectionHeading>
);

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

TableSelectionHeaderCell.defaultProps = {
  id: 'selectAll',
  label: '',
  checked: false,
  onChange: noop,
};

export default TableSelectionHeaderCell;

Version data entries

75 entries across 75 versions & 1 rubygems

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