Notice: The Monaca & Onsen UI Community Forum is shutting down.

For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.

Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.

BringPageTop in Vue, Vuex app.



  • Hi,

    We’ve been developing hybrid app with Vue and Onsen since December with lot of pages. Our first solution was to have navigator with tabbar, all tabbar linked views were just changing tabbar index. All non tabbar were added to stack at second index(with push/replace) when again tabbar was clicked we were just poping from stack. Tabbar was cached, we were happy with it. Last week buisness side of our company said that Tabbar need to have feature to be not selected (because we have more pages on splitter left menu than on tabbar, something like reddedit app) From my understanding this is not how tabbar works. So I’ve implemented our version of tabbar component which changes pages on navigator which is feeded from vuex state with page array. Right now I’m facing challange of caching the pages, so it was pretty obvious to use similar approach like in https://onsen.io/v2/api/js/ons-navigator.html#method-bringPageTop . Again simple task if page is on page stack, just splice it and push on top. It doesnt work with Vue;/ Yeah state is correct but onsen view state is on previous one. So the question is: how I can get the same result like in js api documentation?

    Update: I’ve got it working at cost of page lifecycles from ons-navigator. The question remains: any better solution?