@nick-thompson , this fixes some issues I've been seeing in list view. It stops us from index out of bounds into user supplied data and also resolves issues with selection in list items.
In the above, item.category is always unique, i.e. with 7 categories there will be 7 items in the ListView, my renderItem prop passed to list view is a function returning a BrowserItem instance and the ListViewdata prop is populated with an array of 7 categories. Without the above fix I was seeing random multiple selections and should only be able to "select" a single item at a time in the browser. I believe this has something to do with the fact that we first render the ListView when added to the component tree and then again in response to onMeasure, presumably this a result of our change in ListView which deliberately fixes the key prop on list items.
@nick-thompson , this fixes some issues I've been seeing in list view. It stops us from index out of bounds into user supplied data and also resolves issues with selection in list items.
I had a case similar to below:
In the above, item.category is always unique, i.e. with 7 categories there will be 7 items in the
ListView
, myrenderItem
prop passed to list view is a function returning aBrowserItem
instance and theListView
data
prop is populated with an array of 7 categories. Without the above fix I was seeing random multiple selections and should only be able to "select" a single item at a time in the browser. I believe this has something to do with the fact that we first render theListView
when added to the component tree and then again in response toonMeasure
, presumably this a result of our change inListView
which deliberately fixes thekey
prop on list items.