No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    v-back-to-top on toolbar

    Help
    2
    3
    1316
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      aziz19 last edited by

      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”>
      Title
      </q-toolbar-title>
      <button>
      <i>mail</i>
      </button>
      </div>

      that what i did but seems not working

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • A
          aziz19 last edited by

          this solved it, thank you

          1 Reply Last reply Reply Quote 0
          • First post
            Last post