Saulis / iron-data-table

iron-data-table is a Web Component for displaying data as a table or grid. Built on top of iron-list using Polymer.
Apache License 2.0
147 stars 66 forks source link

data rows not displaying until clicking column sort. #173

Open chisholmd opened 7 years ago

chisholmd commented 7 years ago

I am using iron-data-table successfully in one script but in another I have some weird behavior. The table columns display but there are no data rows. I have confirmed that the items variable is populated with valid json. If I click on a column heading then all the rows display and the table goes to full width.

I tried setting the sort in js after the items variable is populated but that didn't work. the column label is bold but still no data rows display

Ideas? What am I missing?

lluisgener commented 7 years ago

Try adding this to iron-data-table:

  attached: function() {
    this.async(function() {
      var tmp = this.$.list.firstVisibleIndex; 
      this.$.list.scrollToIndex(tmp); 
    }.bind(this), 100);
  },