Forum Discussion
Biju Joseph
Feb 27, 2018Copper Contributor
SharePoint Framework Extension for a list
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!
- Rajesh SitaramanBrass Contributor
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; } }