-
Notifications
You must be signed in to change notification settings - Fork 20
Can't get core-list to display after upgrade #47
Comments
btw, all other core and paper tags seems to work for me. |
😟 I'm having the same problem. My code: <core-list id="list" flex height="64" data="{{songs}}">
<template>
<song-listing song="{{model}}" on-enqueue="{{handleEnqueue}}"></song-listing>
</template>
</core-list> I'm poking around in the code to see if I can suss out what's happening. |
Using
works as expected. So there shouldn't be anything wrong with the array. |
Seems like the error is in the initializeData function in core-list (line 650 in release 0.5.1)
At my computer this._target.offsetHeight is 0 which leads to physicalCount being zero no matter what. When changing this to this._physicalCount = 2, my two list items are displayed.. |
@olemartin try calling |
@mbleigh Yes, I tried that. Had to put the call in the domReady-lifecycle-function in order to not get any errors. But the list is still empty.. |
+1 for this issue. I just started trying out core-list today with Polymer 0.5.1, and was convinced I was somehow doing it wrong, until I saw olemartin's |
The change to core-list in 0.5.0 that added variable height support requires that the list be visible when shown, or else The general solution we have considered for this class of issues is detailed in Polymer/polymer#849. I'll go ahead and start on that solution, since the issue reared its head pretty quickly for you guys. For those still having your lists not rendered, if you navigate to the place in your app where the list should be rendered, select the |
I reproduced #48 which was preventing the manual |
@kevinpschaaf I can confirm that things are working as expected after the fix for #48 landed. |
It still doesn't work for me after updating from master This is my component:
The error is in core-list, at line 652, saying that this._target.offsetHeight is undefined. Commenting out that line at setting _physicalCount to a static value makes the list appear. |
@olemartin Okay, so two issues with above:
In short, I believe that fixing your sizing should solve your issue. |
This works:
Note:
|
@kevinpschaaf Thank you! I got it to work. The problem is that I am displaying the core-list inside a paper-dialog, and currently I don't know when the paper-dialog is displayed. Can't find any callback on that element. I added a setTimeout(updateSize, 1000), but that seems strange :-) You may close this issue if I am going out of scope of this issue. |
Hi I have a render problem(no render) of a core-list element when my custom element is in core-animated-pages here is a jsfiddle when it works( grey list) ==> album-grid outside core-animated-pages http://jsfiddle.net/flagadajones/yq30u78d/ here is a jsfiddle when id doesn't works( no grey list) ==> album-grid inside core-animated-pages http://jsfiddle.net/flagadajones/m87sd0x3/2// |
@flagadajones This is a symptom of the issue I described in this comment #47 (comment) related to a general problem around coordinating the timing of elements that need to measure themselves (e.g. core-list) with elements that hide/show/resize their children (core-animated-pages). This will be resolved in Polymer/polymer#849, which is currently in progress. In the meantime, adding call to .updateSize() at startup and any time the core-animated-pages page changes (e.g. |
hi, updateSize --> _resetIndex but in "updateSize" the method "this._getFirstVisibleIndex()" is called and this method returns "undefined"! so the whole update does not work and later on "_virtualStart" is "NaN" and the result is, that the list does not show anything. if i do not enter anything in my login and only click my login-button, this "updateSize" is not called and the list works fine. as a workaround i inserted a "return 0" at the end of "_getFirstVisibleIndex" because this function returns only values if _physicalCount>0 which is not the case. |
The same problem here. My workaround for this is to set the height of the core-list manually by setting the styling height via JavaScript until there's no fix available. My thread at SO is here: https://stackoverflow.com/questions/27251551/why-does-core-list-doesnt-set-a-height-within-a-core-header-panel |
Resolved via Polymer/polymer#849 and 86b8754. Calling |
I really like the explanation here: #47 (comment) But wouldn't it be nicer to display a warning instead of not rendering the elements at all? Right now, if you have a sizing issue core_list_dart doesn't even create the DOM elements. This makes one think that there is a bug somewhere, possibly in core_list_dart. Had it created the DOM elements in a way that looks ugly, or had it displayed a warning message that elements cannot be created to prevent an ugly look, it would be closer to what one would expect. Silently refusing to create the DOM elements confuses the programmer. |
Appears that #56 maybe a duplicate of this issue |
Hi @kevinpschaaf, since the bug is already fixed in 5.2, I am not sure why your jsbin (http://jsfiddle.net/zg5k5wez/4/) sample still doesn't work if I remove all the |
@JustinXinLiu Thanks, that pointed out a missing resize notification in |
@gazialankus: For now, I've added a |
Thanks @kevinpschaaf. Work like a charm! |
After I upgraded from 0.4.2 this code stopped working. I have read documentation, and I think I have implemented it correctly.
Please help.
The text was updated successfully, but these errors were encountered: