patternfly-react
patternfly-react copied to clipboard
Bug - MenuToggleCheckbox - events not generated when clicking on text
Trying to replace the deprecated Dropdown
, for an existing bulk select, and running into trouble.
After a selection, the user cannot click on the "10 selected" text below to expand the list. We can only click on the down arrow to expand the list.
As a workaround, I wrapped the "10 selected" text in a span
and used its onClick
to open the list. However, this does not seem correct. I expected the onClick
of MenuToggle
to be triggered.
Notes
When the text is clicked:
- the
onSelect
ofDropdown
isn't called - the
onClick
ofMenuToggle
isn't called - neither
onChange
oronClick
ofMenuToggleCheckbox
are called
With the older, deprecated Dropdown
/ DropdownToggleCheckbox
, I'm able to click anywhere on the text / dropdown.
Code
I'm able to replicate the issue with the bulk select codesandbox example below https://codesandbox.io/p/sandbox/proud-glitter-cw5v7h