Skip to content

Table renders a selection checkbox even when onSelectionChange is not provided #1049

Description

@RUKAYAT-CODER

Overview
src/components/ui/Table.tsx renders each row's checkbox via onSelectionChangeCheckbox (line 214) whose only guard is if (!onSelect), but TableRow always receives onSelect={() => toggleSelectRow(id)} (line 525), so the guard never triggers. The header checkbox, however, is gated on onSelectionChange (line 442). When a consumer omits onSelectionChange the body rows show a checkbox column that the header lacks, misaligning every column. Only render the row checkbox when selection is enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendNexjs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions