13 May 2012 2:49 PM #1
Automatic deselect when select other item
I'm trying to modify the Dataview to add in some custom dom when calling applyItemTpl, I manage to get that working, when I select on the list item, I will add some CSS and do some stuff on the new dom, and when other list item selected, I want to 'deselect' the previous one by removing the CSS.
I've studied the Dataview.js source, since it wil remove the x-item-selected class for not selected item, but I'm kinda lost when trying to figure out how and where the code remove the x-item-selected class from previously selected list item and assigned it to the newly selected list item.
15 May 2012 5:35 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
It gets removed in the doItemDeselect method or you can use eventsMitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.