-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iron-list does not show all items on bound array change #3319
Comments
I have faced the same issue, where only one element is rendered, even though the bound array has more elements. I noticed that resizing the window causes all of the elements in the bound array to be rendered. So my workaround for now is to fire a 'resize' event manually on the parent. |
I, too, would like to see this fixed. |
I have a case where we're loading some data over a websocket. I then update the Array. It behaves the same way as described by @dstefanox |
Hi @dstefanox, I think the behavior you observe is due to
You can see the difference by adding the following style attribute to your example :
Of course, you will probably prefer using layout classes rather than using such a fixed size. In your example, it works on second click because after first click, iron-list has estimated the height to render all items (based on rendering one). That's also why you can see iron-list has changed its height after first click. @freshp86: This is also what's happening when resizing the window, because iron-list re-render itself upon resize events. I guess this issue should be moved to https://github.com/PolymerElements/iron-list |
@plequang is correct that |
Attached is example which demonstrates bug.
Simple component is created which contains iron-list, which is bound to array, which is filled on the click of a button on demo page.
When page is initially loaded, on first click, only first item is shown in iron-list, although list contains 15 items. On second click, list shows all items.
Attached archive contains two screenshots which illustrate problem, as well as minimal source code to reproduce issue.
bug-report-iron-list.zip
The text was updated successfully, but these errors were encountered: