Closed tralves closed 1 year ago
It works now! See PR: https://github.com/nativescript-community/ui-drawer/pull/24
It works well. The examples all run. There are some things I couldn't quite understand:
1- It is using the wrapper component src/ui-drawer/vue3/component.ts
. The exported methods don't work (they cause an infinite loop). Instead, I am just calling the open
and close
methods directly on the nativeView
(e.g. this.$refs['drawer'].nativeView.open(side);
). I have a feeling I saw this happening before in another plugin...
2- For some reason these methods don't work if called from a function registered in setup() or Githubissues.
Please, tell us how to recreate the issue in as much detail as possible.
I spent some time trying to implement support for Vue3.
Here's my attempt: https://github.com/tralves/ui-drawer/tree/add-vue3-support I was heavily inspired on
SwipeMenu
's implementation, but it doesn't work.I can see that my
Drawer
component (https://github.com/tralves/ui-drawer/blob/add-vue3-support/src/ui-drawer/vue3/component.ts) is created but not theNativeDrawer
component (https://github.com/tralves/ui-drawer/blob/add-vue3-support/src/ui-drawer/vue3/index.ts)If anyone know the solution or wants to try themselves, I'd be very thankful.
Thanks!