I have a list component which is filled out using a data store(data loaded from server as json). A part of data from data store is displayed as list items, and i need some kind of a “+” button to the left of it to expand a list item(and “-” to collapse) to reveal(/hide) the remaining info. I could simply put some javascript to itemTpl tag but i’ve no idea how to make smooth transitions this way. Maybe am missing some standard settings for a list component, but i can’t find any info. Any help appreciated.
Share
There is no standard settings to do this functionality. But this is possible to achieve. You can have your item template as something like this:
Initially, the details is hidden. You need to handle the animation when your taps the list item. So, in your event you will have to do:
}
The object is obtained from
select()method isExt.dom.CompositeElementLite.. Refer this class for more methods. You can call theExt.Animfrom this object as well..To animate you can use the
Ext.Animclass. Once you have the html element of you ‘details’ div, you can:Refer to Anim class for more setting that might be needed to have your desired effect. Also note that you will have to track the previously clicked (expanded) list items.