Deprecate inactive prop in command bar, it is no longer being used
Bug Report
- Package version(s): 6.26.0
- Browser and OS versions: Chrome
Priorities and help requested:
Are you willing to submit a PR to fix? No
Requested priority: (Blocking, High, Normal, Low)
Products/sites affected: (if applicable)
Describe the issue:
Create an IContextualMenuItem in the Commandbar with inactive: true does not change the button to readonly.
Create an IContextualMenuItem:
private commandBarItems(): IContextualMenuItem[] {
let items: IContextualMenuItem[] = [];
items.push({
key: 'totalItemsString',
name: totalItemsString,
inactive: true
});
}
Create an command bar with this item:
public render() {
return (
<CommandBar items={this.commandBarItems()} />
);
}
As shown in this screenshot:

Actual behavior:
With inactive: true or without, the button is rendered same, i.e., not a readonly button
Expected behavior:
With inactive: true, the button should be readonly with proiperties such as no hover effect, no pointer cursor, button should be disabled etcs.
It turns out that there is no logic behind the inactive prop, which is actually great, because it shouldn't have been added IMO as the default behavior should be that disabled menu items are focusable but not interactive.
Recommend we mark as deprecated.
to followup, you can use 'allowDisabledFocus' from the button.types.ts to make the command bar buttons be disabled yet focusable (will need to add disabled as well).
https://codepen.io/micahgodbolt/pen/ZjBeQP
@micahgodbolt @dzearing thank you for the quick response.