polymer 2.x - Instruct paper-dialog-scrollable to scroll to bottom -


i have paper-dialog-scrollable filled dom-repeat firebase-query. works fine, except paper-dialog-scrollable doesn't scroll bottom when firebase adds entry array. managed set callback whenever array gets new entry (basically observer on spliced array, not on array). how instruct paper-dialog-scrollable scroll bottom callback ? saw solutions here don't seem work. insight.

as suggested in link provided, give paper-dialog-scrollable id (e.g pds) , add following code:

this.$.pds.$.scrollable.scrolltop = this.$.pds.$.scrollable.scrollheight;

an element's scrolltop value measurement of distance element's top topmost visible content. when element's content not generate vertical scrollbar, scrolltop value 0. learn more scrolltop.

the element's scrollheight read-only property measurement of height of element's content, including content not visible on screen due overflow. learn more scrollheight.

i have made demo here: https://plnkr.co/edit/jizedd6nobbnwndbqufa?p=preview.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -