Skip to content

Commit 0d556bd

Browse files
authored
fix(table): fix comp exp jump, background fade on collapse (#7578)
1 parent dd13467 commit 0d556bd

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/patternfly/components/Table/examples/Table.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,7 @@ Note: To apply padding to `.pf-v6-c-table__expandable-row`, wrap the content in
16761676
| `.pf-m-animate-expand` | `.pf-v6-c-table` | Modifies the table to animate expansion. |
16771677
| `.pf-m-expanded` | `.pf-v6-c-table__tbody`, `.pf-v6-c-table__control-row`, `.pf-v6-c-table__compound-expansion-toggle` | Modifies a `<tbody>`, control row, and item in a control row for the expanded state. |
16781678
| `.pf-m-no-background` | `.pf-v6-c-table__expandable-row-content` | Modifies the expandable row content to have a transparent background. For in compound expandable when the parent expandable row has no padding with `.pf-m-no-padding`. |
1679+
| `.pf-m-no-animate-expand` | `.pf-v6-c-table__control-row.pf-m-expanded` | Disables animation on a compound expandable row. **Note:** Used to disable the animation when clicking between compound expandable items. |
16791680

16801681

16811682
## Compact variant

src/patternfly/components/Table/table.scss

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -587,10 +587,10 @@
587587
display: revert;
588588
visibility: hidden;
589589
opacity: var(--#{$table}__expandable-row--Opacity);
590-
transition-delay: 0s, 0s, var(--#{$table}__expandable-row--TransitionDuration--collapse--fade);
590+
transition-delay: 0s, 0s, var(--#{$table}__expandable-row--TransitionDuration--collapse--fade), var(--#{$table}__expandable-row--TransitionDuration--collapse--fade);
591591
transition-timing-function: var(--#{$table}__expandable-row--TransitionTimingFunction);
592-
transition-duration: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade), var(--#{$table}__expandable-row--TransitionDuration--collapse--slide), 0s;
593-
transition-property: opacity, translate, visibility;
592+
transition-duration: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade), var(--#{$table}__expandable-row--TransitionDuration--collapse--slide), 0s, 0s;
593+
transition-property: opacity, translate, visibility, background-color;
594594
translate: 0 var(--#{$table}__expandable-row--TranslateY);
595595

596596
&[hidden] {
@@ -627,6 +627,13 @@
627627
}
628628
}
629629
}
630+
631+
> .#{$table}__control-row.pf-m-no-animate-expand ~ .#{$table}__expandable-row {
632+
--#{$table}__expandable-row--TransitionDuration--collapse--fade: 0s;
633+
--#{$table}__expandable-row--TransitionDuration--collapse--slide: 0s;
634+
--#{$table}__expandable-row--TransitionDuration--expand--fade: 0s;
635+
--#{$table}__expandable-row--TransitionDuration--expand--slide: 0s;
636+
}
630637
}
631638
}
632639
// stylelint-enable max-nesting-depth, selector-max-class

0 commit comments

Comments
 (0)