Skip to content

Commit

Permalink
Fix primefaces#7050: HeaderCheckbox passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Aug 15, 2024
1 parent 0c4eeca commit 395cd64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/lib/datatable/HeaderCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@ export const HeaderCell = React.memo((props) => {
if (props.showSelectAll && getColumnProp('selectionMode') === 'multiple' && props.filterDisplay !== 'row') {
const allRowsSelected = props.allRowsSelected(props.value);

return <HeaderCheckbox hostName={props.hostName} checked={allRowsSelected} onChange={props.onColumnCheckboxChange} disabled={props.empty} ptCallbacks={ptCallbacks} metaData={parentMetaData} unstyled={props.unstyled} />;
return (
<HeaderCheckbox hostName={props.hostName} column={props.column} checked={allRowsSelected} onChange={props.onColumnCheckboxChange} disabled={props.empty} ptCallbacks={ptCallbacks} metaData={parentMetaData} unstyled={props.unstyled} />
);
}

return null;
Expand Down
2 changes: 1 addition & 1 deletion components/lib/datatable/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const TableHeader = React.memo((props) => {
if (props.showSelectAll && selectionMode === 'multiple') {
const allRowsSelected = props.allRowsSelected(props.value);

return <HeaderCheckbox hostName={props.hostName} checked={allRowsSelected} onChange={onCheckboxChange} disabled={props.empty} ptCallbacks={props.ptCallbacks} metaData={props.metaData} />;
return <HeaderCheckbox hostName={props.hostName} column={props.column} checked={allRowsSelected} onChange={onCheckboxChange} disabled={props.empty} ptCallbacks={props.ptCallbacks} metaData={props.metaData} unstyled={props.unstyled} />;
}

return null;
Expand Down

0 comments on commit 395cd64

Please sign in to comment.