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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -