q-drawer hide/show event object is undefined
-
Hello,
I’m trying to figure out why the event object is not getting passed to handler, first I thought the problem might be linked to my project, because I’m using a slightly older version of the framework (v1.9.16) so I edited a barebones q-drawer sample from Quasar framework documentation which uses version (v1.12.8), but it still does not work. Am I missing something obvious? @click event seems to work just fine.
link to codepen: https://codepen.io/kasparesky/pen/LYGdKKa?editable=true&editors=101%3Dhttps%3A%2F%2Fquasar.dev%2Flayout%2Fdrawer
As you can see I’m calling handler without and with explicitly setting event object, the result in console logs is the same. Any help would be much appreciated.
-
@kasparesky I think that those events only get passed to the listeners if you pass them in on the first place when you use the functions on the drawer.
I might be wrong though … just a guess.
https://codepen.io/turigeza/pen/qBbYvXx?editors=1010It kind of make sense. I mean if you set the model of the drawer what sort of event are you expecting to receive ? I don’t think there is way to know what event caused the model change.
So it seems
https://github.com/quasarframework/quasar/blob/dev/ui/src/components/drawer/QDrawer.js -
@turigeza thanks for the response, and yes it actually makes sense, the event itself is being fired and it does not really matter what caused it, I’m not sure what was I expecting to see in the $evt object to be honest. Anyway thank you for your insight.