Skip to content

Commit ac2fa81

Browse files
authored
Merge pull request #10537 from SharePoint/bjansen/spfxcommandkeys
Explain how to format command keys for commands brought by an SPFx Co…
2 parents ac43866 + 8ea9dbf commit ac2fa81

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
192 KB
Loading

docs/declarative-customization/view-commandbar-formatting.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Command bar customization syntax reference
33
description: Command bar customization syntax reference
4-
ms.date: 05/21/2025
4+
ms.date: 12/22/2025
55
ms.localizationpriority: high
66
---
77

@@ -121,6 +121,12 @@ Mandatory property to uniquely identify a command in the Command bar. Valid keys
121121
> [!IMPORTANT]
122122
> Command bar customizations also affect the item context menu (right-click menu). If a command is hidden in the command bar, it will also be hidden in the context menu.
123123
124+
## Reference keys for commands brough by SPFx ListView Command Set extensions
125+
126+
Above key references cover the out-of-the-box commands, but it's also common to have custom commands brought via [SharePoint Framework (SPFx) ListView Command Set extensions](../spfx/extensions/get-started/building-simple-cmdset-with-dialog-api.md). These commands have also have a static key that uses following naming convention: `SpfxCustomActionNavigationCommand_` + id of command set extension + name of command. The latter two can be fetched from the commandset manifest json file. In below example the key for the custom command would be `SpfxCustomActionNavigationCommand_2c5694dc-fdd0-444c-bb1e-8b0741af5a11COMMAND_2`:
127+
128+
![shows how to build the command key for a custom command created via an SPFx ListView Commmand Set extension ](images/spfxcommandsetkeynaming.png)
129+
124130
## hide
125131

126132
An optional property that specifies the condition to hide a particular command. The value of this property can either be a boolean, string or an Expression object. `false` is the default behavior (meaning the command is visible). `true` means that the command will be hidden.

0 commit comments

Comments
 (0)