Daniele B
06/12/2021, 4:56 PM1.0.0-beta07
and 1.0.0-beta08
This is the code:
LazyColumn {
stickyHeader {
CountriesListHeader()
}
items(items = countriesListState.countriesListItems, itemContent = { item ->
CountriesListRow(
item = item,
favorite = countriesListState.favoriteCountries.containsKey(item.name)
})
}
In case countriesListItems
hasn’t changed but favoriteCountries
has changed:
• in beta07, items
recompose (and that’s what I would expect, as in CountriesListRow
the favorite
parameter depends on favoriteCountries
)
• in beta08, items
don’t recompose, as it seems Compose is just monitoring changes of countriesListItems
and not favoriteCountries
Is this a bug, or I should structure my code differently?ste
06/12/2021, 5:44 PMLazyVerticalGrid
). Composition does not fire after items list gets clearedDaniele B
06/12/2021, 5:50 PMVsevolod Ganin
06/12/2021, 6:27 PM7437341
at that time) and the issue was gone. So hopefully this is fixed in beta09Vsevolod Ganin
06/12/2021, 6:30 PMRafs
06/12/2021, 8:21 PM