I have a weird issue with some code I'm writing. on tap I'm doing:
inSender.addClass("selected");
And the dom element is getting styled as I expect, but:
console.log(inSender.classes)
isn't showing the "selected" class. And when I try to remove the class later, nothing happens to the dom element. I can see the node in the enyo.instance object and it has selected listed as a class, but the classes property doesn't.
I was originally using a Scroller and adding the elements using create component, which was working fine. I decided to switch to a List since the scroller didn't perform well on the touchpad. and this problem creeped up.
Any suggestions on where I should look?
0 • •
Comments
- Spam
- Abuse
0 • Off Topic Insightful •You need to use calls to prepareRow() and lockRow() around any manipulation in order for this to work outside of the onSetupRow handler.
- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •Thanks
- Spam
- Abuse
0 • Off Topic Insightful •prepareRowandlockRoware for more specialized cases.Fwiw, ironically, List has a selection mechanism built in. To use that all you need to do is this:
- Spam
- Abuse
0 • Off Topic Insightful •I'm going to try your suggested by storing off the prior selected index and call renderRow on that.
- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •The implementation is simply:
- Spam
- Abuse
0 • Off Topic Insightful •