feat(menu): Add delay before closing nested menu after mouse leave
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### Feature Description
**Problem**
When navigating through nested menu items, we must follow a tight path, otherwise it'll close the nested menu.
**Proposed Solution**
In the current behavior, after the mouse leave, the menu is closed.
If we add some delay, before closing the nested menu after the mouse leave event, we could leverage from better navigation.
**Sugestion**
Add an option (matMenuNestedCloseDelay) to change the behavior of closing the nested menu.
When this option is used, it should wait X miliseconds (similar to matTooltipShowDelay) before closing the nested menu after mouse leave.
Also add this option to [MatMenuDefaultOptions](https://material.angular.io/components/menu/api#MatMenuDefaultOptions) to allow override this behavior with injection token.
```
...
```
### Use Case
If I try to selected the 90 days options, througth the smallest path, it closes the nested menu.

**Desired Behavior**
Taken from [stackoverflow](https://stackoverflow.com/a/50953452) with similar issue.

Beitragsleitfaden
Rechercherichtung
Beginne damit, das Verhalten zum Schließen verschachtelter mat-menu-Menüs beim Verlassen mit der Maus nachzuverfolgen, und vergleiche die angeforderte Verzögerung mit matTooltipShowDelay. Lege fest, wie matMenuNestedCloseDelay auf mat-menu und MatMenuDefaultOptions verfügbar gemacht werden soll, und überprüfe anschließend das verzögerte Schließen sowie die Überschreibung des injection-token mit den bestehenden Tests des Menüs.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100