fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

CommandBar does not pass item on onClick handler anymore

Open eveleens opened this issue 8 years ago • 1 comments

Bug Report

  • Package version(s): 6.42
  • Browser and OS versions: (fill this out if relevant)

Priorities and help requested:

Are you willing to submit a PR to fix? No

Requested priority: Blocking

Products/sites affected: Flow

Describe the issue:

The onClick handler used to pass in "item" for the button in CommandBar

Actual behavior:

The onClick handler passes "undefined" for the button in CommandBar

Expected behavior:

The onClick handler used to pass in "item" for the button in CommandBar and relevant data.

If applicable, please provide a codepen repro:

https://codepen.io/anon/pen/djQNEW If you click on "Menu1", you'll see that item is undefined.

https://codepen.io/anon/pen/LBXWRj Change the Fabric version to 5.63, and it supplies the button item with relevant data passed through.

eveleens avatar Aug 08 '18 19:08 eveleens

Yeah, I'd relied on the standard onClick callback provided by the button. I see that the old code does a bit of work to sub the item in. I'll update as well as add a test.

micahgodbolt avatar Aug 08 '18 20:08 micahgodbolt