On 12/14/16, 1:29 AM, "sankar" <santanu4...@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 >accomplish >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 >feature? 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. -Alex