I replaced the default editor with a custom one just as described in the docs. However, after opening an NgDialog for our own editor and returning false in the function, the default editor still shows up for a split second.
Is this a bug or can I do something to remove that behaviour?
Below you can see some screenshots of the code and the problem I mentioned.
Screenshot 2021-10-28 at 17.47.15.png (136.09 KiB) Viewed 1128 times
Screenshot 2021-10-28 at 17.49.45.png (324.43 KiB) Viewed 1128 times
When I disable the feature completely as you mentioned above, the onBeforeEventEdit event is not emitted anymore, and so I cannot show our custom editor.
Is there any way to keep the custom editor, and stop the default editor from appearing?
That is what I have been doing already if you see the above screenshots. The default editor still shows up for a split second before then disappearing even though I am returning false.
thanks for looking into it! Sadly, your workaround does not work for me, as I am calling this.dialog.open() using a Material Dialog. When I try to put that logic into the object assignment or the constructor of the component like you show above, I get an error saying it cannot read open() of undefined.
I am guessing the object wrapping messes with the context of the this keyword?
Yes, you're right this points to nowhere or a wrong place. The solution would be to install the listener during initialization. In your case it would boil down into this app.component.ts: