Help needed ! Adding custom context pad remove all its previous entries in context pad

Here is the code i have written it is adding a new custom shape in context but removing all previous shapes in context pad.

You can find an example of how to add new entries while keeping existing entries here: diagram-js/lib/features/context-pad/ContextPadProvider.ts at develop · bpmn-io/diagram-js · GitHub

Basically, you’d want to return a function instead of an object:

getPopupMenuEntries(element) {
  return function(entries) {
    // ...
  };
}