Skip to content

Bug: Table select-all checkbox doesn't support indeterminate state #12410

@rhamilto

Description

@rhamilto

Describe the problem

The Table component's select-all checkbox in the header does not support the indeterminate state (dash/minus icon) when some (but not all) rows are selected. This is inconsistent with PatternFly's bulk selection design guidelines which recommend showing indeterminate state for partial selections.

Steps to reproduce

  1. Create a table with selectable rows using the select prop on Th
  2. Select some (but not all) rows
  3. Observe that the header checkbox remains unchecked, even though some items are selected

Expected behavior

The select-all checkbox should have three states:

  • Unchecked - no items selected

  • Indeterminate (dash/minus icon) - some items selected

  • Checked - all items selected

Actual behavior

The header checkbox only shows checked/unchecked states. When some items are selected, it appears unchecked, which doesn't properly communicate the selection state to users.

Technical details

The ThSelectType interface only supports isSelected: boolean:

```typescript
export interface ThSelectType {
onSelect?: OnSelect;
isSelected: boolean; // Only supports true/false, no indeterminate
isHeaderSelectDisabled?: boolean;
isDisabled?: boolean;
props?: any;
}
```

Environment

Additional context

This affects both Table and DataView Table components. While BulkSelect in the toolbar is the recommended pattern, there are valid use cases for table-only selection (tables without toolbars, compact UIs, etc.).


Jira Issue: PF-4111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions