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)
>

Reply via email to