Prevent clicking dropdown item from closing the menu #5487
Labels
Status: Investigate
Needs to investigate more to what can be done.
Type: Feature ⚙
Request or idea for a new feature.
Milestone
Is your feature request related to a problem? Please describe.
In my dropdown, I want to add two " buttons". One that enables all checkboxes in the dropdown, and one that disables all of them. I have working code behind this, and it toggles the checkboxes. However, when these dropdown items are clicked, the dropdown menu is closed.
Currently, this is an implementation for a dropdown menu with items with and without checkboxes. When the item with the checkbox is clicked (anywhere), the dropdown menu stays open. When the dropdown item without the checkbox is clicked, the dropdown menu closes.
Describe the solution you'd like
I would like to see a parameter I could add to the dropdown item that disables "close on click"
With the code above, the updated could look like this.
Perhaps, this same parameter can also be used to enable "close on click" for dropdown items with checkboxes. I don't know the use case for this, but it might end up being useful
Current workaround:
I have currently added this workaround, that simply reopens the dropdown when the dropdown item is clicked.
Additional context
The workaround does seem to work fine, even if it isn't the most elegant option. Therefore, this feature request doesn't have a high priority
The text was updated successfully, but these errors were encountered: