angular / angular/components

Material submenu in separate component doesn't open on mouseover

Đang mở
#27,235 4 bình luận 4 reaction 0 người được giao Xem trên GitHub
area: material/menu P3
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ả

### Is this a regression?

- [x] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

14

### Description

Creating a menu component as a library when the nested menu is in a separate component. The basic functionality of the menu is to hover over it, a nested menu should be opened. However, when the nested menu is in a separate component, on hover of the parent options, the nested menu is not opening.

This functionality was working fine in angular v14, after upgrading to 15.2.9 we are facing this issue

NOTE: The same functionality will work if the nested menu is in the same component.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/angular-bifan2?file=src%2Findex.html

### Expected Behavior

To open the menu on hover when the nested menu is in a separate component

### Actual Behavior

The menu on hover is not working when the nested menu is in a separate component

### Environment

package.json versions

"@angular/animations": "15.2.9",
"@angular/cdk": "15.2.9",
"@angular/common": "15.2.9",
"@angular/compiler": "15.2.9",
"@angular/core": "15.2.9",
"@angular/forms": "15.2.9",
"@angular/material": "15.2.9",

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 StackBlitz được liên kết và so sánh hành vi hover của menu lồng nhau giữa Angular 14 và Angular 15.2.9. Theo dõi hành vi của menu Angular Material khi menu lồng nhau nằm trong một component riêng biệt. Được xem là hoàn tất khi hover vào tùy chọn cha sẽ mở menu lồng nhau, khớp với hành vi khi cả hai menu nằm trong cùng một component.

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
45/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.