[Bug]: calling onClick handler on TreeItem on every single click, not filtering clicks from action, subtree or selection.
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 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 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
This has already been resolved here: https://github.com/microsoft/fluentui/pull/32434 it should be available on the next release version
Fixed, closing
@bsunderhus @miroslavstastny can you please let me know when the next release will be. Can you please let me know any ETA. Thanks
It has been released already @anuj7676 https://github.com/microsoft/fluentui/releases/tag/%40fluentui%2Freact-tree_v9.8.0