Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
And we finally edit the lifecycle handlers of the extensions to suit our needs
// imports ...
export default class CustomFormPanelCommandSet extends BaseListViewCommandSet<ICustomFormPanelCommandSetProperties> {
public onListViewUpdated(event: IListViewCommandSetListViewUpdatedParameters): void {
const openEditorCommand: Command = this.tryGetCommand('CMD_PANEL');
openEditorCommand.visible = event.selectedRows.length === 1;
public onExecute(event: IListViewCommandSetExecuteEventParameters): void {
switch (event.itemId) {
case 'CMD_PANEL':
let selectedItem = event.selectedRows[0];
const listItemId = selectedItem.getValueByName('ID') as number;
const title = selectedItem.getValueByName("Title");
this._showPanel(listItemId, title);
throw new Error('Unknown command');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment