SharePoint Framework Extension for a list

Copper Contributor

Dear Friends,

 

I have created a Framework extension using Command Set and deployed successfully. It is applied to all generic list as I have mentioned "100" in the registrationId. I don't want to this command appear in all the list but want to be specific in specific site alone. What is the technique to do that. please help. 

 

Thanks in advance!

1 Reply

I think you should check for your desired site and list inside 

@override 
public onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void { let desiredSiteList: boolean = false; const compareOneCommand: Command = this.tryGetCommand('COMMAND_1'); if (compareOneCommand) { // Check for site title/url and list here and update desiredSiteList compareOneCommand.visible = desiredSiteList; } }