Preserve 'selectedItems' after appling 'filterFunction'

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Preserve 'selectedItems' after appling 'filterFunction'

Olaf Krueger
Hi,
It seems to me that 'selectedItems' property of a s:List is always emtied
after a filter is applied to its 'dataProvider' by using a custom
'filterFunction'.
Is there a way to preserve the selectedItems?

Or do I have to backup the 'selectedItems' manually in order to re-assign it
after the filter is applied?

Thanks,
Olaf




--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Preserve 'selectedItems' after appling 'filterFunction'

Alex Harui-2
IIRC, you have to back it up and filter it.  I'm not sure what will happen
if one or more of the selectedItems is no longer in the filtered data
provider.

HTH,
-Alex

On 1/2/18, 8:44 AM, "Olaf Krueger" <[hidden email]> wrote:

>Hi,
>It seems to me that 'selectedItems' property of a s:List is always emtied
>after a filter is applied to its 'dataProvider' by using a custom
>'filterFunction'.
>Is there a way to preserve the selectedItems?
>
>Or do I have to backup the 'selectedItems' manually in order to re-assign
>it
>after the filter is applied?
>
>Thanks,
>Olaf
>
>
>
>
>--
>Sent from:
>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-fle
>x-users.2333346.n4.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cb2c07
>96c7eb64d9d0ea708d552002a2f%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C6
>36505083018035029&sdata=NzLa4NEXvF7uDUM6hKW0hIMXRsnUV7oN3aFWKRw6KbA%3D&res
>erved=0

Reply | Threaded
Open this post in threaded view
|

Re: Preserve 'selectedItems' after appling 'filterFunction'

GhaziTriki
In reply to this post by Olaf Krueger
Hello,

I have implemented a similar feature for the DataGrid component. You can
check it here
https://github.com/bigbluebutton/bigbluebutton/blob/master/bigbluebutton-client/src/org/bigbluebutton/main/views/BBBDataGrid.as#L36

Thanks,
Ghazi



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Preserve 'selectedItems' after appling 'filterFunction'

Olaf Krueger
Thank you, guys!
I will go the way to backup the selected items before filtering.

Thanks,
Olaf



--
Sent from: http://apache-flex-users.2333346.n4.nabble.com/