PolymerElements / iron-list

Element for a virtual, "infinite" list
https://www.webcomponents.org/element/PolymerElements/iron-list
217 stars 131 forks source link

iron-list when parent has flex-direction: column-reverse #470

Open iSuslov opened 7 years ago

iSuslov commented 7 years ago

Let me know if you don't understand the issue, but briefly speaking it just does not work when parent has flex-direction: column-reverse. I'm developing chat and want scrolling region to stick to the bottom. Documentation does not say anything about not supporting column-reverse.

        <iron-scroll-threshold class="fit column-reverse" id="threshold">
            <iron-list items="[[messages]]">
                <template>
                    <div>{{item.msg}}</div>
                </template>
            </iron-list>
        </iron-scroll-threshold>

This does not work when messages are dynamically added after first render. Size of iron-list becomes > 10000px and there are big vertical gaps between elements.

keanulee commented 7 years ago

We haven't looked into/supported the reverse scrolling use case, but generally you wouldn't need to have iron-scroll-threshold around iron-list (since iron-list already handles scroll events).