Skip to content

Commit

Permalink
Fix primefaces#5370: TreeTable highlight selection in Checkbox mode
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 22, 2023
1 parent e286f3e commit a61190a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/lib/treetable/TreeTableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,11 @@ export const TreeTableRow = React.memo((props) => {
};

const isSelected = () => {
if ((props.selectionMode === 'single' || props.selectionMode === 'multiple') && props.selectionKeys) return props.selectionMode === 'single' ? props.selectionKeys === props.node.key : props.selectionKeys[props.node.key] !== undefined;
else return false;
if (props.selectionMode === 'single' || ((props.selectionMode === 'multiple' || props.selectionMode === 'checkbox') && props.selectionKeys)) {
return props.selectionMode === 'single' ? props.selectionKeys === props.node.key : props.selectionKeys[props.node.key] !== undefined;
}

return false;
};

const isChecked = () => {
Expand Down

0 comments on commit a61190a

Please sign in to comment.