From a14ce17959de9cff07165bb797afcbda135c0622 Mon Sep 17 00:00:00 2001 From: Kevin Coughlin Date: Mon, 16 Apr 2018 10:58:35 -0700 Subject: [PATCH 1/3] Invoke CommandBar's onItemClick vs item onClick when href set --- .../src/components/CommandBar/CommandBar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx index 223dc0968e366e..38a1e1556bdf9c 100644 --- a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx +++ b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx @@ -210,7 +210,7 @@ export class CommandBar extends BaseComponent) => void { + private _onItemClick(item: IContextualMenuItem): (ev: React.MouseEvent) => void { return (ev: React.MouseEvent): void => { if (item.inactive) { return; From c3f61f6a283bda14397d4a81541c00daee9a7ed4 Mon Sep 17 00:00:00 2001 From: Kevin Coughlin Date: Mon, 16 Apr 2018 11:11:28 -0700 Subject: [PATCH 2/3] Append anchor element type to end of union type --- .../src/components/CommandBar/CommandBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx index 38a1e1556bdf9c..699f8a01e5d261 100644 --- a/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx +++ b/packages/office-ui-fabric-react/src/components/CommandBar/CommandBar.tsx @@ -417,7 +417,7 @@ export class CommandBar extends BaseComponent) => void { + private _onItemClick(item: IContextualMenuItem): (ev: React.MouseEvent) => void { return (ev: React.MouseEvent): void => { if (item.inactive) { return; From ed4dd8037baba15f474d24a09b6300a5d94c2116 Mon Sep 17 00:00:00 2001 From: Kevin Coughlin Date: Mon, 16 Apr 2018 11:12:46 -0700 Subject: [PATCH 3/3] + changelog --- ...eco-fix-href-commandbar-item_2018-04-16-18-12.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/office-ui-fabric-react/keco-fix-href-commandbar-item_2018-04-16-18-12.json diff --git a/common/changes/office-ui-fabric-react/keco-fix-href-commandbar-item_2018-04-16-18-12.json b/common/changes/office-ui-fabric-react/keco-fix-href-commandbar-item_2018-04-16-18-12.json new file mode 100644 index 00000000000000..1d2cce4f7cf0ed --- /dev/null +++ b/common/changes/office-ui-fabric-react/keco-fix-href-commandbar-item_2018-04-16-18-12.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Passes item when href set onClick for CommandBar control", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "keco@microsoft.com" +} \ No newline at end of file