Event for when the menu is opening for the select components #4789
Closed
MoaLeonhardt
started this conversation in
Ideas
Replies: 3 comments 6 replies
-
@e111077 might know more about the risks, but a naive solution could be to compose and bubble those events |
Beta Was this translation helpful? Give feedback.
6 replies
-
Feature adopted in #4799 |
Beta Was this translation helpful? Give feedback.
0 replies
-
That's wonderful news! Thanks a lot! 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Concerning the select components (md-outlined-select and md-filled-select).
The regular HTML select component lacks events for when the select menu is opened. However, it looks like md-menu has an @opening event. If that event would be available on the material-web components md-outlined-select and md-filled-select it would be very useful.
For example, I'm using @lit-labs/task to create a select component where the menu data is not loaded until the menu is expanded. This is useful for cases when there's a lot of data, and normally no need to retrieve it, only when the user interacts with the select component.
Neither the focus event nor the click event can achieve this on their own, although it may be possible to combine them in a non-trivial way to find out when the menu is opened according to this stack overflow discussion.
PS. I'm sure other events such as menu closing, menu closed, menu opened, etc.. would be useful as well.
Beta Was this translation helpful? Give feedback.
All reactions