Skip to content

Commit

Permalink
Design feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
stephl3 committed Dec 2, 2024
1 parent 1e73af5 commit a966835
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/table/src/Row/InternalRowWithRT.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const InternalRowWithRTForwardRef = <T extends LGRowData>(

const isExpandable = row.getCanExpand();
const depth = row.depth;
const hasSubRows = row.subRows.length > 0;

const contextValues = useMemo(() => {
return {
Expand All @@ -55,7 +56,7 @@ const InternalRowWithRTForwardRef = <T extends LGRowData>(
className={getRowWithRTStyles({
className,
isDisabled: disabled,
isExpanded: isExpanded || isParentExpanded,
isExpanded: (isExpanded && hasSubRows) || isParentExpanded,
isOddVSRow,
isSelected,
isVirtualRow: !!virtualRow,
Expand Down
6 changes: 4 additions & 2 deletions packages/table/src/Row/Row.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@ export const getRowWithRTStyles = ({
!isVirtualRow && shouldAlternateRowColor && !isSelected,
[getGrayZebraRowStyles(theme)]:
isOddVSRow && shouldAlternateRowColor && !isSelected,
[getSelectedRowStyles(theme)]: isSelected && !isDisabled,
},
{
[getExpandedContentParentStyles(theme)]: isExpanded,
[getExpandedContentParentStyles(theme)]: isExpanded && !isSelected,
},
{
[getSelectedRowStyles(theme)]: isSelected && !isDisabled,
},
className,
);
Expand Down

0 comments on commit a966835

Please sign in to comment.