Questions tagged [dom-repeat]
66 questions
5
votes
1 answer
dom-repeat with parameterized template
What is the clean way, with Polymer 2.0, to parameterize the dom-repeat item template ?
Usage:
[[item]]
CustomComponent:

fso
- 144
- 2
- 14
4
votes
2 answers
re-sort Polymer dom-repeat after change of value in child
I have a Polymer dom-repeat list where the children get sorted o.k. on the initial value.
When I change the a value inside of the child, the depending sort order of the list is not updated. How can I best achieve that?
…

MGR Programming
- 655
- 6
- 10
3
votes
1 answer
Can I use dom-repeat on slotted content to wrap each slotted child inside some tag?
I'd like to use dom-repeat to wrap a bunch of child nodes in tags. The problem is, the nodes I want to repeat are custom elements themselves, inserted via a slot, and it seems that dom-repeat only takes data passed via attributes.
What I want…

Elise
- 5,086
- 4
- 36
- 51
3
votes
2 answers
Polymer - dom-repeat & caching of element data in DOM tree
following scenario:
I have a Firebase database containing a list that is used to create a set of "paper-cards" with dom-repeat:
…

gerd hübner
- 423
- 3
- 14
3
votes
3 answers
Property change not reflecting in UI when its set from dom-repeat's function - Polymer
I have array of objects and a property, my dom-repeat structure is like as below
//first dom repeat
[[myProperty]] //here also its not updating
…

ksh
- 639
- 1
- 7
- 23
2
votes
2 answers
Fire a CustomEvent from element in dom-repeat
Hello I have this issue with a dom-repeat template. I have an element with a dom-repeat and inside I'm showing a my-item element, I have a button that fired a custom event and I need to get that event in the parent element but I can't make it work.…

Jose Raul Perera
- 778
- 1
- 7
- 35
2
votes
1 answer
How to Pass in Dropdown Value to dom-repeat
I am trying to pass in a value to a dom-repeat template, but the behavior defaults to the first item in the array. I am trying to set a string from an array of strings.
Parent Component

Matthew
- 1,461
- 3
- 23
- 49
2
votes
2 answers
Polymer feed value into second dom-repeat
I'm trying to use a dom-repeat inside a dom-repeat over a json array inside a json array. How can pass a value from the first array over to the second dom-repeat?
To illustrate, I have the following json array which loads fine:
"books": [
{
…

Vims
- 157
- 1
- 8
1
vote
1 answer
In Polymer can I make a dynamically created paper-button change color when I click it?
I am trying to change the color of a paper-button that is created dynamically through the element. Let's say I have this piece of code:
Itemnumber: [[item.number]]…

Tipsi
- 404
- 4
- 12
1
vote
1 answer
How to addEventListener to Polymer 2.0 iron-forms loaded with iron-ajax within dom-repeat template
I have been using the following syntax to edit iron-form requests before submitting in Polymer 2.0:
connectedCallback() {
super.connectedCallback();
someForm.addEventListener('iron-form-presubmit, function() {...})
}
Now I want to load…

bill88
- 13
- 4
1
vote
1 answer
How to Push Data to dom-repeat
I am trying to push data to a history array that will be updated inside a dom-repeat template.
Template
Add to History
Matthew
- 1,461
- 3
- 23
- 49

Matthew
- 1,461
- 3
- 23
- 49
1
vote
1 answer
How to Randomize Display Order of div in Polymer
I am trying to randomize the display of divs in Polymer, but am having trouble translating this post into the framework.
Random Div Order on Page Load
ready() {
super.ready();
let cards = this.shadowRoot.querySelectorAll('.className');
for(var…

KVNA
- 847
- 1
- 11
- 24
1
vote
1 answer
Polymer 2 queryselector doesn't work
I try to add an eventlistener to some dynamically created elements, but i cannot target them.
//here is how I try to access it
_buildTable(data)
{
this.$.spinner.style.display = 'none';
this.tableHead = Object.keys(data[0]);
…

NeitoFR
- 716
- 1
- 11
- 23
1
vote
1 answer
How to Structure Associative Array to Inject into `dom-repeat`
I have an array of arrays that I would like to use in a dom-repeat, but am getting an error saying the data isn't array-like.
dom-repeat.html:465 dom-repeat expected array for items, found {0: Array(1), 1: Array(1), 2: Array(13)...
The original…

Matthew
- 1,461
- 3
- 23
- 49
1
vote
1 answer
How to Select Dropdown by Value dom-repeat Dropdown
I am trying to load back in dropdown settings after a page refresh in Polymer. The dropdown loads dynamically from an AJAX call, and once the dropdown in set it is saved in localStorage.

Matthew
- 1,461
- 3
- 23
- 49