I have an array that is for unacessable by index like this: myArr[index]
.
after logging my array in Dev tools i get the following output that looks like an empty array
however after expanding the array i get the following:
which is a populated array but with 0 length
is there an explanation for this and how can i be able to access the items in the array?
i'm using a vadeen grid to display a set of data in a polymer app
<vaadin-grid selection-mode="multi" items="{{households}}" id="simple">
<table>
<colgroup>
<col name="$key" sortable/>
</colgroup>
</table>
</vaadin-grid>
the data is bound to the grid using a firebase query element.. it works fine(i reduced some attributes from the code)
<firebase-query
id="query"
data="{{households}}"
>
the problem happens when i try to add buttons just like they did in thislink
just for testing i added these three lines of code
var grid = this.$.simple;
console.log('length '+grid.columns.length);
console.log(grid.columns);
console.log(grid.columns[2]);
here's the output from these three lines
as you can see the printed size is 0 but the one displayed at the console is 6(i have no idea why this happens). as far as i know a populated array with 6 elements should look like Array[6]
instead of Array[0]
and should be displayed as [Object, Object .....]
instead of []
but i dont quite get what i'm missing here.