Skip to content

Instantly share code, notes, and snippets.

@billdami
Last active March 10, 2019 21:22
Show Gist options
  • Save billdami/d7822c164c7181c0bf5f39af26a706a1 to your computer and use it in GitHub Desktop.
Save billdami/d7822c164c7181c0bf5f39af26a706a1 to your computer and use it in GitHub Desktop.
vertical-collection staticHeight bug
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'vertical-collection staticHeight bug'
});
import Ember from 'ember';
export default Ember.Route.extend({
model() {
const models = [];
const numModels = 1000;
for(let i = 0; i <= numModels; i++) {
models.pushObject({
id: i,
title: `Model #${i}`
});
}
return models;
}
});
<h1>{{appName}}</h1>
{{#vertical-collection
items=models
estimateHeight=21
bufferSize=2
key="id"
as |model index|
}}
<div>{{model.title}} (index: {{index}})</div>
{{/vertical-collection}}
{
"version": "0.15.1",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js",
"ember": "3.4.3",
"ember-template-compiler": "3.4.3",
"ember-testing": "3.4.3"
},
"addons": {
"ember-data": "3.4.2",
"@html-next/vertical-collection": "1.0.0-beta.13"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment