How to programmatically scrollTo a row in a QTable



  • Hi,

    After adding an item to a table I want to jump to that row.
    I have tried to use the scrollTo method, like described in the QTableAPI, but I don’t get it working.

    I think it should work when you there is a table with a ref in the template like this:

    <q-table ref="table">
    

    Jumping to row 9 of a table from a script method must be done by this:

    this.$refs.table.scrollTo(9)
    

    But this does not work.

    I have made I codepen app to show my approach. https://codepen.io/olafxso/pen/gOpmvZJ

    Any idea’s what I am doing wrong?


Log in to reply