-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)type:questionQuestion... if answered, will be tagged as such.Question... if answered, will be tagged as such.
Description
Hello,
we are using SharePoint Framework Extensions: Command Set to add custom commands to contextual menu and toolbar.
There are no issue to add commands whereas we faced an issue how to add tooltips to custom commands.
1. our .manifest.json file content looks like that:
{
"$schema": "https://dev.office.com/json-schemas/spfx/command-set-extension-manifest.schema.json",
"id": "...",
"alias": "DocumentLibraryCommandSet",
"componentType": "Extension",
"extensionType": "ListViewCommandSet",
"requiresCustomScript": false,
"items": {
"SomeId": {
"title": {
"default": "some name"
},
"iconImageUrl": "...",
"type": "command"
},
}
}
2. we added classs which extends 'BaseListViewCommandSet' and overrided: onInit, onListViewUpdated, onExecute.
export default class xxxtLibraryCommandSet extends BaseListViewCommandSet<xxx> {
@override
public onInit(): Promise<void> {
return xxx;
}
@override
public onListViewUpdated()
xxx
}
@override
public onExecute(xxx): void {
xxx
}
3. classes
- 'BaseListViewCommandSet' extends 'BaseExtension', there is 'context:
ListViewCommandSetContext' - 'ListViewCommandSetContext' has 'manifest:ICommandSetExtensionManifest'
- here are 'items' with 'ICommandDefinition' type
items: { [itemId: string]: ICommandDefinition; };
and 'ICommandDefinition' has only 4 fields
(I'm not able to add, for example desctiption or tooltip here)
export interface ICommandDefinition {
title: ILocalizedString;
type: 'command';
ariaLabel?: ILocalizedString;
iconImageUrl?: string;
}
Could anybody to give a hint how to add tooltips to custom commands?
Metadata
Metadata
Assignees
Labels
area:spfxCategory: SharePoint Framework (not extensions related)Category: SharePoint Framework (not extensions related)type:questionQuestion... if answered, will be tagged as such.Question... if answered, will be tagged as such.