Quasar: Scrolling QScrollArea with JS

Created on 12 Aug 2017  路  1Comment  路  Source: quasarframework/quasar

Software version

Quasar: 0.14Beta
OS: OSX
Node: 7.4.0
NPM: 5.3.0
Browsers: Electron
iOS: N/A
Android: N/A
Any other software related to your bug:

What did you get as the error?

<q-scroll-area> doesn't respond to scrollArea.scrollTop = X

What were you expecting?

To be able to scroll inside a <q-scroll-area> with JS

What steps did you take, to get the error?

using the following method:

  methods: {
    autoScroll () {
      setInterval(() => {
        this.scroll.position++
        scrollArea.scrollTop = this.scroll.position
      }, 5)
    }
}

The interval worked, but no scrolling took place.

Most helpful comment

Added method:

| Method | Description |
| --- | --- |
| setScrollPosition(offset[, duration]) | Set scroll position to an offset. If a duration (in milliseconds) is specified then the scroll is animated. |

>All comments

Added method:

| Method | Description |
| --- | --- |
| setScrollPosition(offset[, duration]) | Set scroll position to an offset. If a duration (in milliseconds) is specified then the scroll is animated. |

Was this page helpful?
0 / 5 - 0 ratings