How am I doing that? The underlying data within an ArrayList gets updated. The ArrayList is the data provider to the List.
Ya don't do that. OK :-D The suggestion given I believe would rely on binding which I'm trying to avoid. I hate littering my code with bindings and am only using Flex because I am required to for who I'm writing it for :) So I need a way to tell the item renderer that it needs to update and the only way I originally knew how was to refresh the entire list rather than just the one. Kyle McKnight Senior UI Engineer - Accesso 602.515.1444 (M) On Mon, Oct 24, 2016 at 4:13 PM, Clint M <[email protected]> wrote: > Inline below > > On Mon, Oct 24, 2016 at 11:53 AM, Kyle McKnight <[email protected]> > wrote: > > > Hey everyone! > > > > I have a List that has enough items that one must scroll down to see them > > all. > > > > When clicking an item, it updates the data for that ItemRenderer with a > > quantity value. > > > > How are you doing that. > > > > > > When this happens, I'm calling refresh() on the data provider for the > List > > but this refreshes then entire List and causes it to scroll back up to > the > > top. > > > Ya don't do that. > > > > Is there a way to only update the single ItemRenderer whose data > > changed? Or is there some other way around this? > > > > It depends on how you're doing it in my first question but generally > something like that would just be handled in the itemRenderer like: > > data.quantity = newVal; <-- this will also trigger a collectionChange event > on the lists dataProvider that you could handle > > If you're bubbling a click event up and trying to handle it in a controller > then you could do something like: > > list.dataProvider[itemRenderer.itemIndex].quantity = newValue; > > > > > > Thanks! > > > > Kyle McKnight > > Senior UI Engineer - Accesso > > 602.515.1444 (M) > > >
