dcasia/column-toggler

Toggle menu doesn't appears

scramatte opened this issue · 5 comments

Hi,

I've just installed your component but toggle menu doesn't appears on the index view
Any idea of what occurs?

I've got similar issue with your expandable row component

Regards

It is mostly likely you are using another package that overrides native nova components instead of extending it, can you post your composer json so I can point out which package is the offending one.

Hi,

Thank you to reply.

I've been able to get working column toggler.
It's looks that the problem was with datomatic/nova-detached-actions package.

I've removed it as you have got some similar package to achieve same job.

Okay, it's unfortunate that many packages out there completely replaces the nova components.. There is a way to extend but maybe people are just not very good at vue

@milewski can you please share this way? thanks

Take a look at how I implemented it in this package:

element.insertAdjacentElement('afterend', container)
const vnode = createVNode(ColumnToggler, { tableToolbar: this })
vnode.appContext = app._context
render(vnode, container)

Instead of completely overriding the toolbar, I wait for it to be mounted, and then manually render a new vnode exactly where I want. This way, I dont have to override the original toolbar, and any changes the Nova team makes to it won't affect this package.