1
votes

sorry for my silly question. I have a problem with the "core-list-dart" element. Appart from the fact that it does not create the "infite" elements when needed, it seems to populate the "content" initially. (I am sure it didn't do that earlier this year ;) and it worked as expected -> creating elements as you scroll down)

Seems to be broken in polymer/js too, or do I missunderstand anything about that: http://www.polymer-project.org/components/core-list/demo.html

Experimenting around with the core-list-dart, I stumbled upon scrollTarget which will have an Element as parameter:
How do I pass an Element to the core-list-dart? Are there any examples which do data-binding on other Elements?

Many thanks for now .. hope somebody can understand my problem :D

Working with Dart 1.6 and:

 dependencies:  
   core_elements: ">=0.2.0 <0.3.0"  
   paper_elements: ">=0.1.0 <0.2.0"  
   polymer: ">=0.13.0 <0.14.0"  
1
The population of the core-list was "my fault". I found out that everything worked fine after checking my layout. Did it with "fit" and everything worked like charm. (Before that .. I used css stuff like height: 100% ...) - ARMistice

1 Answers

1
votes

You can do that for example with

<core-list scrollTarget="{{$['id_of_other_element']}}">...</core-list>

in this case the element has to be in the same shadow DOM (same Polymer element) as the <core-list> and it must be statically available (not within <template if=...> or generated by <template repeat=... nor added imperatively.

Another variant is to create a field

<core-list scrollTarget="{{scrollTarget}}">...</core-list>

In the class of your Polymer element you need

@observable 
Element scrollTarget;

attached() {
  super.attached();
  scrollTarget = shadowRoot.querySelector('...');
}