Skip to content

bug([mat-table]): mat-tab-group messes up expandable rows in table #19838

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Diralytic opened this issue Jul 2, 2020 · 2 comments
Closed

bug([mat-table]): mat-tab-group messes up expandable rows in table #19838

Diralytic opened this issue Jul 2, 2020 · 2 comments
Labels
area: material/expansion P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@Diralytic
Copy link

Reproduction
Stackblitz project: https://stackblitz.com/edit/github-itepdn
To see the bug, just open the app, switch to the second tab and go back to the first one.
The bug only shows with enabled Ivy compiler.

Expected Behavior
Switching tabs in mat-tab-group shouldn't affect the expanded rows in the table.

Actual Behavior
All rows in the table are expanded after switching to the second tab and back. This shouldn't be possible as normally the table allows only for one expanded row at a time.

Environment

  • Angular: 9.1.0
  • CDK/Material: 9.2.0
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows and Ubuntu
  • Enabled Ivy

Known workarounds

  • Disable Ivy
{
  ...
  "angularCompilerOptions": {
    "enableIvy": false,
    ...
  }
}

  • Lazy load tab
    <mat-tab label="Table">
       <ng-template matTabContent>
         <app-table></app-table>
       </ng-template>
    </mat-tab>

Is there any other clean solution without disabling ivy or lazy loading tabs?

@Diralytic Diralytic added the needs triage This issue needs to be triaged by the team label Jul 2, 2020
@crisbeto crisbeto added area: material/expansion P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed needs triage This issue needs to be triaged by the team labels Jul 3, 2020
@crisbeto
Copy link
Member

crisbeto commented Jul 3, 2020

Seems like this is the same issue as #11765 which has a pending PR.

@crisbeto crisbeto closed this as completed Jul 3, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/expansion P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

No branches or pull requests

2 participants