Skip to content

Commit

Permalink
Merge pull request #6 from pauln/revert-5-chips-fix
Browse files Browse the repository at this point in the history
Revert "fixed virtual repeat for autocomplete"
  • Loading branch information
pauln authored Nov 7, 2016
2 parents 39b4002 + 235eba7 commit 0a0becf
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions addon/components/paper-virtual-repeat.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@ const VirtualRepeatComponent = VirtualEachComponent.extend({

}).readOnly(),

visibleItemsVirtual: computed.map('_items', function(item, index) {
return { raw: item, virtualIndex: index };
}).readOnly(),

visibleItems: computed('_startAt', '_visibleItemCount', '_items', function() {

let items = get(this, '_items');
Expand All @@ -218,10 +214,15 @@ const VirtualRepeatComponent = VirtualEachComponent.extend({
items[i] = getAtIndex(i);
}
}
this.notifyPropertyChange('_items');
}

return this.get('visibleItemsVirtual').slice(startAt, endAt);
return items.slice(startAt, endAt).map((item, index) => (
{
raw: item,
actualIndex: startAt + index,
virtualIndex: index
})
);
}).readOnly(),

scrollToVirtualItem(newIndex, toTop=false) {
Expand Down

0 comments on commit 0a0becf

Please sign in to comment.