Closed Atrue closed 1 year ago
@mixonic will you be able to cut a release with this fix? Thanks!
Of course. I'm running it through some full-stack checks. See https://github.com/Addepar/ember-table/pull/969. I'm also running it on an app at Addepar as a sanity check :+1:
Now released in 4.0.1 :tada: Thank you @Atrue and team.
Thanks @mixonic!
Fixes https://github.com/html-next/vertical-collection/issues/317. Similar https://github.com/html-next/vertical-collection/pull/359 but using another approach + tests
Scheduled actions as the name says are fired with delay after the render is finished. They are going through the
sync
queue (scheduleUpdate
method) and themeasure
queue (update
method) in the radar class andsetTimeout
(_scheduleSendAction
method) in the component. So there is some gap after the render is finished and before the event is actually fired when theitems
argument can be changed and the event will be fired with an exception. The scheduled actions include the event and index of the item, but due to timeout, the actual item may not exist for this index.Clear the timeout and the queue before scheduling a new update after recalculation to omit these outdated events and fire only the new actual events