Skip to content

Commit

Permalink
docs(material/table): Simultaneous Row Expansion Issue in MatTab with…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
kharazian authored Nov 9, 2023
1 parent 88183c3 commit ed45f44
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {MatTableModule} from '@angular/material/table';
templateUrl: 'table-expandable-rows-example.html',
animations: [
trigger('detailExpand', [
state('collapsed', style({height: '0px', minHeight: '0'})),
state('collapsed,void', style({height: '0px', minHeight: '0'})),
state('expanded', style({height: '*'})),
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
]),
Expand Down

0 comments on commit ed45f44

Please sign in to comment.