angular / angular/components

Mat-table with multiTemplateDataRows is not working when this table is added in mat-tab.

Đang mở
#15,775 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
area: material/table P2
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

#### What is the expected behavior?
it should work fine with/without mat-tab

#### What is the current behavior?
Empty rows are created and displaying

#### What are the steps to reproduce?
Providing a StackBlitz reproduction is the *best* way to share your issue.

StackBlitz starter: https://goo.gl/wwnhMV

Step 1: Go to "https://stackblitz.com/edit/angular-material-expandable-table-rows?file=app%2Ftable%2Ftable.component.ts"

Step 2: Add Mat-tab module in app.module.ts "import {MatTabsModule} from '@angular/material/tabs';"

Step 3: Add the following code at the top, in table.componenet.html

"
Content 1
Content 2
Content 3
"

Step 4: Cut the rest of the code and paste it inside the tab replacing "Content 1"

Step 5: run the code.

Step 6: move to next tab and come back to first tab, the content will be displaying by default. PFA screenshots
![codechanges](https://user-images.githubusercontent.com/40624122/55858472-684e7780-5b8d-11e9-9b85-771dd0b99762.png)
![issue](https://user-images.githubusercontent.com/40624122/55858481-6edcef00-5b8d-11e9-8279-392a77220315.png)

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

#### Is there anything else we should know?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với bản tái hiện trên StackBlitz và so sánh table.component.html với table.component.ts trước và sau khi đặt bảng bên trong mat-tab. Kiểm tra app.module.ts để tìm MatTabsModule, sau đó tái hiện các hàng trống bằng cách chuyển đổi giữa các tab. Hoàn tất khi bảng multiTemplateDataRows hiển thị chính xác nội dung của nó sau khi rời khỏi tab đầu tiên và quay lại tab đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.