Resetting unrendered DataList attempts to access nonexistent boundsCache

Description

When passing an existing collection to a new DataList instance, a race condition can occur where the DataList tries to refresh itself before it's been rendered.

tries to find the (non-existent) list items that correspond with the deleted records by their index. During this search VerticalDelegate tries to calculate the amount of items contained within a single page, which triggers the call to enyo.DataList.delegates.vertical.width, which tries to retrieve the width from the boundsCache.

However, because the DataList has not been rendered yet, there are no bounds yet. The enyo.DataList.delegates.vertical.width does not anticipate this and causes an exception to be thrown.

Environment

Any

Status

Assignee

Screener (Enyo Team)

Reporter

Ruben Vreeken

Labels

None

External issue ID

None

Tango Test Run Elements

None

Old Issue Key

None

Components

Affects versions

2.4.0
2.5.0

Priority

None
Configure