Skip to content

Commit ed45f44

Browse files
authored
docs(material/table): Simultaneous Row Expansion Issue in MatTab with Nested MatTable Component (#27659)
Resolved a bug causing simultaneous row expansion in a MatTab when a nested MatTable component with expandable rows was used. The problem stemmed from animations triggered by the parent's visibility set to 'hidden.' Solution: Incorporated void state within animations to reset them after eraseStyles function execution, ensuring consistent row expansion behavior within MatTabs.
1 parent 88183c3 commit ed45f44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components-examples/material/table/table-expandable-rows/table-expandable-rows-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {MatTableModule} from '@angular/material/table';
1313
templateUrl: 'table-expandable-rows-example.html',
1414
animations: [
1515
trigger('detailExpand', [
16-
state('collapsed', style({height: '0px', minHeight: '0'})),
16+
state('collapsed,void', style({height: '0px', minHeight: '0'})),
1717
state('expanded', style({height: '*'})),
1818
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
1919
]),

0 commit comments

Comments
 (0)