Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-25 Thread Alex Harui
On 10/25/16, 7:39 AM, "kamcknig" wrote: >Your solution works though it feels a bit hacky. I also get a flicker >when I >do it. So a lot of the items will blink out and back in for a split >second. refresh() does a full refresh. itemUpdated and other methods will only

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-25 Thread kamcknig
Your solution works though it feels a bit hacky. I also get a flicker when I do it. So a lot of the items will blink out and back in for a split second. -- View this message in context:

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-25 Thread kamcknig
OK it appears that I got that error becuse I was passing the index of the item in the "source" array. But on my data provider I had a filter on the array so not all items were there. I have now instead dispatched the change with the Object that was changed (FYI, I'm using Signals, not that it

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-25 Thread Kyle McKnight
I get the following error. Looks like at some sort of internal update. I've made sure any index I'm passing in is > -1. And in the case I'm testing it's 0. So internally it's getting a -1 somewhere and I'm not sure. I'm now using listProvider.itemUpdated(listProvider.getItemAt(index)) where index

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-25 Thread Vincent
Hello Kyle, If you want to use the refresh() method, a solution would be to : 1 - Store the verticalScrollPosition value of the scroller of the list (verticalScrollPosition is a property you can access via the viewport property of the scroller) 2 - Invoke the refresh method of the data

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-24 Thread Kyle McKnight
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

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-24 Thread Kyle McKnight
I was looking for something like that. Will get back to you tomorrow with whether it works for me or not! Thanks! Kyle McKnight Senior UI Engineer - Accesso 602.515.1444 (M) On Mon, Oct 24, 2016 at 3:58 PM, OmPrakash Muppirala wrote: > Calling refresh on the

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-24 Thread Clint M
Inline below On Mon, Oct 24, 2016 at 11:53 AM, Kyle McKnight 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

Re: Updating data for List refreshes entire List and scrolls to the top

2016-10-24 Thread OmPrakash Muppirala
Calling refresh on the dataprovider is probably what is causing this. Have you tried using the itemUpdated() function on the dataprovider instead? Here is some info on that:

Updating data for List refreshes entire List and scrolls to the top

2016-10-24 Thread Kyle McKnight
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. When this happens, I'm calling refresh() on the data provider for the List but this refreshes then entire List and