Brian Gardner
03/18/2020, 1:01 PMAdapterList
. If I have actions in the individual row items that should update the view state, I’ve found that using a MutableState
for the individual row views does not work. I’m guessing this is because even if the row view tries to set its state it still needs the state of the AdapterList to update in order to trigger the recomposition. My question then, is how should the state be updated for the AdapterList
? In the itemCallback
of AdapterList
we only get the item passed to the lambda, not an index. Is it safe to grab the index of the item from within the itemCallback
to update the list state?Brian Gardner
03/18/2020, 1:43 PMAdapterList
and updating the state using the index of the items but I’m not seeing the view recompose https://github.com/BrianGardnerAtl/JetpackComposePlayground/tree/adapter-list-state-spikeBrian Gardner
03/18/2020, 1:45 PMstate.value
as well as updating state.value
directly and neither workAdam Powell
03/18/2020, 3:42 PMBrian Gardner
03/18/2020, 5:30 PMBrian Gardner
03/19/2020, 1:32 PMRyan Mentley
03/23/2020, 8:50 PM