flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: Filter function to ArrayList?
Date Wed, 14 Dec 2016 19:05:25 GMT

On 12/14/16, 1:29 AM, "sankar" <santanu4ver@gmail.com> wrote:

>In conventional application we often found a list/grid with a search text
>box. This was easy to handle and filter the collection in Flex SDK, and
>affect the list/grid UI per it's binding.
>> private function filterCollectionOnTextSearch():void
>> {				
>> 	gridArrayCollection.filterFunction = searchName;
>> 	gridArrayCollection.refresh();
>> }
>> private function searchName(item:Object):Boolean
>> {
>> 	if (item.nickName.toLowerCase().indexOf(txtSearch.text.toLowerCase())
>> -1 ) return true;
>> 	return false;
>> }
>FlexJS uses it's own ArrayList API and I didn't found any way to
>the above requirement, so far. Is there any built-in way to filter the
>ArrayList and refresh - and update to list/grid component per it's binding

Regulare Flex ArrayList did not support filtering either.  Filtering in
the Flex SDK is part of the much heavier and slower ArrayCollection.
FlexJS doesn't have that yet.  Volunteers are welcome to provide it.  I
would try to make the filtering as loosely coupled as possible.


View raw message