patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Bug - MenuToggleCheckbox - events not generated when clicking on text

Open dlabrecq opened this issue 1 year ago • 1 comments

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.

chrome-capture-2024-0-23

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 of Dropdown isn't called
  • the onClick of MenuToggle isn't called
  • neither onChange or onClick of MenuToggleCheckbox are called

With the older, deprecated Dropdown / DropdownToggleCheckbox, I'm able to click anywhere on the text / dropdown.

Code Screenshot 2024-01-23 at 11 13 22 AM

dlabrecq avatar Jan 23 '24 16:01 dlabrecq

I'm able to replicate the issue with the bulk select codesandbox example below https://codesandbox.io/p/sandbox/proud-glitter-cw5v7h

dlabrecq avatar Jan 23 '24 18:01 dlabrecq