View Full Version : Automatic deselect when select other item

13 May 2012, 2:49 PM

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
It gets removed in the doItemDeselect method or you can use events