Onsen UI Vue Side Splitter :open.sync not trigger
Basically trying to convert the OnsenUI Vue side splitter example from: https://onsen.io/v2/api/vue/v-ons-splitter-side.html so that it loads each of the pages from their own
My example code can be found here: https://github.com/hermwong/onsenui-vue-side-splitter-example
:openSideproperty in the page component (any of:
Settings.vue). The page component then passes the
openSidevalue into the
CustomToolbar.vuethe value of the
openSideproperty is assigned to the data attribute
<v-ons-toolbar-button>is clicked in
CustomToolbar.vue, it updates the value of
isOpenis updated and it emits the
menuToggledevent which gets handled in the page component.
The page component handles the
menuToggledevent & its payload by emitting the
menuToggledevent & its payload up to
sideMenumethod is used as an event handler for the
sideMenumethod updates the value of
openSidewith the payload received from the
LeftMenu.vuedoes not seem to trigger after the
sideMenumethod has been called.
@hermwong I think you don’t need to pass the
isOpenvalue itself down to the toolbar. You just need a way to modify it. It can be done with a function prop (example here) or with events like you are doing (example here). Hope it helps!
Thanks for the response. I was able to get it to work by using the function prop method.