Changing existing properties panel provider (BpmnPropertiesProviderModule)

Hi everyone!
I need to change properties panel - general group. It is from existing provider - BpmnPropertiesProviderModule.
I need to delete Executable checkbox.
Is there any way to modify existing provider?

Adding a custom provider you could remove this entry (cf. bpmn-js-examples/properties-panel-extension at main · bpmn-io/bpmn-js-examples · GitHub).

1 Like

@philippfromme Do you mean that I should create the same provider, but without this checkbox and replace the existing provider with a new one? Is there no way to remove from the existing one?

Adding a custom provider is the way to remove the entry from the existing provider. getGroups is the crucial part. It allows you to modify the groups returned by other providers that have a higher priority:

class CustomProvider {
  constructor(propertiesPanel) {
    propertiesPanel.registerProvider(LOW_PRIORITY, this);
  }

  getGroups() {
    return function (groups) {
      const generalGroup = groups.find(({ id }) => id === "general");

      if (generalGroup) {
        generalGroup.entries = generalGroup.entries.filter(
          ({ id }) => id !== "isExecutable"
        );
      }

      return groups;
    };
  }
}

CodeSandbox: Remove Properties Panel Entry Example - CodeSandbox

1 Like

Thank you so much for this detailed explanation!

Your forum services are top notch. Very quick and helpful responses. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.