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.
<Dropdown>
<DropdownToggle>
Dropdown Toggle
</DropdownToggle>
<DropdownMenu>
<DropdownItem ShowCheckbox="true">Dropdown Item With Checkbox</DropdownItem>
<DropdownItem>Dropdown Item Without Checkbox</DropdownItem>
</DropdownMenu>
</Dropdown>
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.
<Dropdown>
<DropdownToggle>
Dropdown Toggle
</DropdownToggle>
<DropdownMenu>
<DropdownItem ShowCheckbox="true">Dropdown Item With Checkbox</DropdownItem>
@* Added a parameter here *@
<DropdownItem CloseOnClick="false">Dropdown Item Without Checkbox</DropdownItem>
</DropdownMenu>
</Dropdown>
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.
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