Before k4 my plugin had a <k-button> and <k-drawer> by using @click on the button i managed to open the drawer. That’s not possible anymore. I checked the lab example where the definition of the fields for the drawer is on the open()
Hi @bastianallgeier,
thanks for kicking in. I can only speak for myself but in K3 I used to import a separate single file drawer component by ref which does not seem to work anymore:
@ponchoelastic pasted code pretty similar to the examples from the lab (which is great by the way). It does work for small chunks pretty well but once components become too complex…well, you might guess: better not inline. Refactoring in this case feels like a backroom somewhat.
Hopefully the issue is just caused by a lack of knowledge
With the new panel js api, we have more fine-grained control over the drawer state and can solve the issue of nested drawers in a more stable way. That’s the explanation why the old way of using drawer components directly in your template is deprecated.
When you want to create your own, more complex drawer components, this is still very much possible though.
This is an example component plugin for a custom drawer
Thank you very much @bastianallgeier, that’s quite helpful and I will adapt my component but still: the template component definition feels a bit isolating in terms of coding because the benefits of code separation into single files already became a common pattern. In consequence a rewrite seems inevidable sadly. @ponchoelastic hurry up, mate