Skip to content

Commit

Permalink
Fix #7513: TreeTable stripedRows fix (#7561)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jan 3, 2025
1 parent 7dd20db commit 99be44f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/lib/treetable/TreeTableBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const classes = {
row: ({ isSelected, rowProps: props }) => ({
'p-highlight': isSelected(),
'p-highlight-contextmenu': props.contextMenuSelectionKey && props.contextMenuSelectionKey === props.node.key,
'p-row-odd': props.rowIndex % 2 !== 0
'p-row-odd': parseInt(String(props.rowIndex).split('_').pop(), 10) % 2 !== 0
}),
rowCheckbox: ({ partialChecked }) => classNames('p-treetable-checkbox', { 'p-indeterminate': partialChecked }),
rowToggler: 'p-treetable-toggler p-link p-unselectable-text',
Expand Down
2 changes: 1 addition & 1 deletion components/lib/treetable/TreeTableRow.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import { ariaLabel } from '../api/Api';
import { Checkbox } from '../checkbox/Checkbox';
import { ColumnBase } from '../column/ColumnBase';
import { useMergeProps } from '../hooks/Hooks';
import { CheckIcon } from '../icons/check';
Expand All @@ -9,7 +10,6 @@ import { MinusIcon } from '../icons/minus';
import { Ripple } from '../ripple/Ripple';
import { classNames, DomHandler, IconUtils, ObjectUtils } from '../utils/Utils';
import { TreeTableBodyCell } from './TreeTableBodyCell';
import { Checkbox } from '../checkbox/Checkbox';

export const TreeTableRow = React.memo((props) => {
const elementRef = React.useRef(null);
Expand Down

0 comments on commit 99be44f

Please sign in to comment.