vendredi 30 janvier 2015

classNameBindings not working

In a component I have three properties defined in my classNameBindings:



classNames: ['ui-selectize'],
classNameBindings: [ 'touchDevice', 'fingerFriendly', 'selected:selected:not-selected' ]


What I'd expect is that if at run-time the properties 'fingerFriendly' or 'touchDevice' were true that the classnames 'finger-friendly' and 'touch-device' would be added respectfully. That is almost happening but I'm getting some pretty odd behaviour. Also annoying is that this DID used to work but I can't figure out what is now interfering.


So in a situation where both touchDevice and fingerFriendly are true I can look at the inspector and see the following:


correctly associated to binding


The above looks right but if I look at the classNames property I have:


touch-device is included?


I'm a little surprised that touch-device is showing up here considering it's not a statically bound property. However, what surprises me the most is that if it is included than surely finger-friendly should be included too, right?


For actual code you can find it all here:


http://ift.tt/1JSYXIh





Aucun commentaire:

Enregistrer un commentaire