v-back-to-top on toolbar

  • hey, is there a way to use v-back-to-top directive on the toolbar like twitter?

    <div class=“toolbar” v-back-to-top>
    <!-- Toolbar title -->
    <q-toolbar-title :padding=“1”>

    that what i did but seems not working

  • Admin

    Back to top directive is supposed to make the node/component it is applied to to show only when a certain scroll threshold has been exceeded. If you want the toolbar to scroll to top when clicked then just add @click event which does this. Find the scrolling node and set .scrollTop native JS property to 0. If you want animation with that, then use the Animate API (http://quasar-framework.org/api/js-utils.html#Animate) to set this property.

  • this solved it, thank you

Log in to reply

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.