vertical-collection
vertical-collection copied to clipboard
Error: Assertion Failed: value must non-negative
when using vertical-collection within a div that has column-count > 1 style property the scroller fails with this error:
Error: Assertion Failed: value must non-negative
controller:
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
sample = [
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
{nr: 1},
]
}
hbs:
<div style="column-count: 3">
<div>first</div>
<div class="table-wrapper dark" style="height:500px; overflow: scroll">
{{#vertical-collection sample estimateHeight=90 bufferSize=5 as |item index|}}
<div style="height: 80px; margin: 5px; background: red ">{{item.nr}} -> {{index}}</div>
{{/vertical-collection}}
</div>
</div>
Also seeing this. When it happens, the whole app crashes and you can't click any link-to's etc. On beta.13.
I'm using ember-table and am getting the exact same error and symptoms (crashing the whole app). Anybody have any solutions after a year?
For what it's worth, I came across this error (seems like the height of something was getting calculated as negative during the measurement phase), and I was able to work around it by setting staticHeight=true in my usage (since I didn't need any of the dynamic loading pieces, luckily). Hopefully that helps anyone that comes across this in the future!