Hides the entrance to the popup menu

I prefer not to show palette&contextPad in some cases, which I currently do:

      BPMNConfig.additionalModules = [
        {
          paletteProvider: ['value', {}],
          contextPadProvider: ['value', {}]
        }
      ]

In 9.x version is normal operation, but after I put the version upgrade to 11.2, even if doing so, still can see the entrance to the popup menu

At any time I don’t need a popup menu entry, how am I supposed to hide it

@xu.zhang Context pad and palette can be provided through different components. Specifically in v11.2.0 we introduced the create/append anything menu that you see over there.

To reliably remove all entries (contributed through different providers) register a popup menu or palette provider with lowest priority, and provide a middleware function that returns no elements:

class ClearAllEntriesPaletteProvider {
  constructor(palette) {
    palette.registerProvider(1, this);
  }

  getPaletteEntries() {

    // clear all entries middleware
    return (entries) => [];
  }
}

Hope that works for you.

It solved my problem very well, thank you very much

1 Like

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