Skip to content

Commit

Permalink
Delete trigger registration (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Alison Lai <[email protected]>
  • Loading branch information
alisonjlai and Alison Lai authored Jul 9, 2024
1 parent 4c3ca62 commit 9d8b2ec
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/client/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export function initialize<T = {}>(): PluginInstance<T> {

let subscribedInteractions: Record<string, WorkbookSelection[]> = {};
let subscribedWorkbookVars: Record<string, WorkbookVariable> = {};
const registeredActionTriggers = new Set<string>();

const listeners: {
[event: string]: Function[];
Expand Down Expand Up @@ -137,17 +136,9 @@ export function initialize<T = {}>(): PluginInstance<T> {
void execPromise('wb:plugin:selection:set', id, elementId, selection);
},
triggerAction(id: string) {
if (!registeredActionTriggers.has(id)) {
throw new Error(`Invalid action trigger ID: ${id}`);
}
void execPromise('wb:plugin:action-trigger:invoke', id);
},
configureEditorPanel(options) {
registeredActionTriggers.clear();
for (const option of options) {
if (option.type !== 'action-trigger') continue;
registeredActionTriggers.add(option.name);
}
void execPromise('wb:plugin:config:inspector', options);
},
setLoadingState(loadingState) {
Expand Down

0 comments on commit 9d8b2ec

Please sign in to comment.