How to fix following error when custom object is dropped on Flow

I have created custom pallet provider, renderer and rules. I only want to allow element to be dropped on flow. I am unable to find where i should insert parent to make this work.

EventBus.js:380 TypeError: Cannot read property 'indexOf' of undefined
    at BpmnOrderingProvider.getOrdering (BpmnOrderingProvider.js:146)
    at OrderingProvider.js:48

Please advise

Could you explain your issue in a structured and detailed manner, so anyone has a fair chance to understand your use case?

If you are stuck with a particular problem, provide the necessary context. Phrase your post so that we can follow your line of thought, step by step.

Please revise your post; we may not be able to help you otherwise. We may also close topics of low quality to prevent spam.

Thanks :heart:

I create a project to show the problem.

I am unable to figure out where i should make change so that the custom object can be dropped on the flow.

Please provide some direction.

Do you understand where this error comes from? You might create a custom ordering provider to handle your custom elements.

Yes I have already create it. But I think i am missing something when i create the custom object. I debugged the code and it looks like OrderingProvider is looking for parent object and not able to find it (but parent is set and it is lost in the process of command stack. So I was wondering what am I doing wrong or what is missing?

Can you share a CodeSandbox where it is easier for us to debug the problem?