fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Bug]: calling onClick handler on TreeItem on every single click, not filtering clicks from action, subtree or selection.

Open anuj7676 opened this issue 1 year ago • 1 comments

Library

React Components / v9 (@fluentui/react-components)

System Info

Are you reporting an Accessibility issue?

None

Reproduction

https://stackblitz.com/run?file=src%2Fexample.tsx

Bug Description

This is a regression on Fluent side, here we are calling onClick handler on TreeItem on every single click, we're not filtering clicks from action, subtree or selection.

Seems like it's another ripple effect from this https://github.com/microsoft/fluentui/pull/31766

Previous to the bugfix from #31766, we would use onOpenChange method, which filtered those cases, now that onOpenChange is no longer being called we should filter directly on onClick?!

Actual Behavior

calling onClick handler on TreeItem on every single click, we're not filtering clicks from action, subtree or selection.

Expected Behavior

filter clicks from action, subtree or selection.

Logs

No response

Requested priority

Blocking

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] The provided reproduction is a minimal reproducible example of the bug.

anuj7676 avatar Aug 27 '24 09:08 anuj7676

@anuj7676 can you please provide repro that showcases the issue ? your link opens blank stackblitz.

Note that without repro we are unable to investigate further and the issue will be closed. thanks

Hotell avatar Aug 27 '24 16:08 Hotell

@Hotell I have updated the stackblitz link. Please let me know if this is helpful -

https://stackblitz.com/edit/b4iyu4-zbjym5?file=src%2Fexample.tsx,index.html

anuj7676 avatar Sep 03 '24 11:09 anuj7676

This has already been resolved here: https://github.com/microsoft/fluentui/pull/32434 it should be available on the next release version

bsunderhus avatar Sep 05 '24 14:09 bsunderhus

Fixed, closing

miroslavstastny avatar Sep 09 '24 14:09 miroslavstastny

@bsunderhus @miroslavstastny can you please let me know when the next release will be. Can you please let me know any ETA. Thanks

anuj7676 avatar Sep 11 '24 10:09 anuj7676

It has been released already @anuj7676 https://github.com/microsoft/fluentui/releases/tag/%40fluentui%2Freact-tree_v9.8.0

bsunderhus avatar Sep 11 '24 15:09 bsunderhus