Skip to content

Conversation

@AStoker
Copy link
Contributor

@AStoker AStoker commented Aug 22, 2016

fixes: #73
Previous behavior was that any virtual-repeat that was initially
hidden could not correctly calculate heights. New behavior is such that
initially hidden elements can display correctly after they have been
shown.

this.itemHeight = calcOuterHeight(firstViewElement);
if (this.itemHeight <= 0) {
throw new Error('Could not calculate item height');
this._sizeInterval = setInterval(()=>{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this._sizeInterval might need to be terminated in the detached callback as well. In case the item height never gets greater than 0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, good call. Do you think 500ms is fine for the interval? I just made it match the interval (time wise) with the one defined earlier in regards to scrolling. Possibly make it faster, slower?

@AStoker AStoker force-pushed the view-change-problems branch from 887ad88 to 319cc59 Compare August 23, 2016 13:05
fixes: aurelia#73
Previous behavior was that any `virtual-repeat` that was initially
hidden could not correctly calculate heights. New behavior is such that
initially hidden elements can display correctly after they have been
shown.
@AStoker
Copy link
Contributor Author

AStoker commented Aug 24, 2016

Any other notes @martingust?

@martingust
Copy link
Contributor

@AStoker I think it's all good. I'll get this merged later today.

@martingust martingust merged commit 319cc59 into aurelia:master Aug 26, 2016
@AStoker
Copy link
Contributor Author

AStoker commented Aug 26, 2016

@martingust, any idea on when this will get published to a new release?

@martingust
Copy link
Contributor

@EisenbergEffect Can you release this repo? There is a breaking change waiting in master b7ff555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Items don't render when initially hidden

2 participants