How to auto-import component for a directive and trigger it properly wit hevents? #17443
Unanswered
ivanjaros
asked this question in
General - Components / Directives / etc
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a auto-completing popup(q-menu) that shows up when users types in '@' into input that has my custom directive enabled. The problems I have are two:
a) i need to use the global event bus with custom event, which must be on the instance via boot file(in itself not a problem since i already use it, but it imposes unwanted dependency) in order to trigger this component
b) i have to import this component in my main App.vue template so it is essentially always in the application and shows up only when triggered via said event
I do not think this is the right approach. So what would be the proper way to invoke the component without quasar's event bus and how can i "open" the component(q-menu+some backend api lookup logic) without having to manually specify in in the main App.vue template? The q-menu or q-dialog themselves work like i would expect this to be(ie. auto-imported and toggled based on events).
Beta Was this translation helpful? Give feedback.
All reactions