You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resetSelection: Ember.observer('visibleContent.[]', function fixtableGrid$resetSelection() {
if (!this.get('rowSelection')) { return; }
let selectedRows = Ember.Object.create();
this.set('selectedRows', selectedRows);
this.get('visibleContent').forEach((row, rowIndex) => {
selectedRows.set(rowIndex.toString(), false);
});
This forEach fails ungracefully when data is not set at render time. Setting the data to an empty array fixes this, though this behavior is inconsistent with the same table without row selection.
The text was updated successfully, but these errors were encountered:
@smargovsky, looking at this code a little more closely, I'd expect this forEach to be fine because visibleContent should compute to an empty array if content hasn't been set on the fixtable-grid yet. When you say "when data is not set at render time," what specifically does that mean? Can we reproduce this in a relatively simple environment (e.g., the dummy app)?
Obviously we can just not loop over visibleContent if it doesn't exist, but I wonder if this is actually caused by calling this function at the wrong point in the component lifecycle or something.
This
forEach
fails ungracefully when data is not set at render time. Setting the data to an empty array fixes this, though this behavior is inconsistent with the same table without row selection.The text was updated successfully, but these errors were encountered: