sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Command bar customization - Position ListView Command Set extension

Open FlorianReinprecht opened this issue 3 years ago • 5 comments

Hi,

is it possible to postion your own Command Set extensions?

I guess you would need to know the "key" of said extension? Or is this a limitation of this feature?

Thanks for your help.

BR


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

FlorianReinprecht avatar Mar 04 '22 07:03 FlorianReinprecht

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Mar 04 '22 07:03 ghost

@FlorianReinprecht - what do you mean under "position"? You can use Sequence parameter similarly to classic custom actions. But it will not allow you to move your customizer before out of the box commands anyway.

AJIXuMuK avatar Mar 04 '22 14:03 AJIXuMuK

HI @AJIXuMuK - yeah, I wanted to know, if this new Commandbar Formatting Feature would also work for moving the customizer before the OOTB commands.

Because it seems like I can move the OOTB commands behind the customizer with the help of the position property. (https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/view-commandbar-formatting#position)

Would have been nice to also use this for custom commands.

FlorianReinprecht avatar Mar 07 '22 15:03 FlorianReinprecht

@FlorianReinprecht - position property is not applicable for SPFx command sets.

AJIXuMuK avatar Mar 07 '22 15:03 AJIXuMuK

Hello, maybe a little late but it should be useful to someone else...

Here is an exact description of what you can edit and what you can't: You can't completely control the order in which the user custom actions show up; the user custom actions are added in the order the _api/web/Lists(guid'listid')/CustomActionElements returns the user custom actions, and this API currently does not take into account the sequence attributes. Buttons defined inside a custom tab can be ordered by adding them in the correct order in the CommandUIDefinition xml. Our sample shows Button 3 as first and that's because of the order in the XML.

If you already have the Command set deployed, you need to find out the id or Name, for example via: Get-PnPSiteTemplate or _api/web/Lists(guid'listid')/CustomActionElements and then modify via Invoke-PnPSiteTemplate or Set-PnPApplicationCustomizer -Identity "GuidOrName" -Sequence "10001" Lower Sequence higher importance.

necik11 avatar Feb 01 '24 10:02 necik11

Thank you for taking the time to file an issue. We periodically archive older or inactive issues as part of our issue management process, which automatically closes them once they are archived.

If you’d like to understand more about why and how we handle archived (closed) issues, please see Our approach to closed issues.

We appreciate your contribution and if this is still an active issue with the latest SPFx versions, please do resubmit the details. We needed to perform a cleanup, so that we can start with a clean table with a new process. We apologize for the inconvenience this might cause.

github-actions[bot] avatar May 02 '25 15:05 github-actions[bot]