Yep. The general advice is to manipulate the model, not the DOM instances.

For one thing, if you update the DOM instances and then re-sort the list,
you'll may need to remember which nodes you updated imperatively and clear
them.

OK
Arthur



On Thu, Apr 14, 2016 at 4:34 PM, Karl Tiedt <[email protected]> wrote:

> Why not make class a computed binding? Otherwise use this.querySelectorAll
> the $$ is a wrapper for the singular
> On Apr 14, 2016 16:31, "Colin Cannon" <[email protected]> wrote:
>
>> How can I select and add an additional class to all elements of a certain
>> class that were created by a dom-repeat?  For example:
>>
>> <template is="dom-repeat" items="{{foo}}>
>>   <div class="bar">{{item.spot}}</div>
>> </template>
>>
>> In the Polymer() definition, how can I add an additional class,
>> "secondClass" to add the div's with the class "bar"?
>>
>> this.$$(''bar") only returns the first div
>>
>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/polymer-dev/75ebd564-30e0-45cf-939c-d7d4946d788d%40googlegroups.com
>> <https://groups.google.com/d/msgid/polymer-dev/75ebd564-30e0-45cf-939c-d7d4946d788d%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> Follow Polymer on Google+: plus.google.com/107187849809354688692
> ---
> You received this message because you are subscribed to the Google Groups
> "Polymer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/polymer-dev/CADNgbTEYxFb9sAqxpqsDPWVccUJSXSZ2Wcnv%2Bz7CRUQqKiQr5A%40mail.gmail.com
> <https://groups.google.com/d/msgid/polymer-dev/CADNgbTEYxFb9sAqxpqsDPWVccUJSXSZ2Wcnv%2Bz7CRUQqKiQr5A%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADSbU_zoPN3z8vGkS0kpOy-3ijjMOpx%2Btrm%3D0b7P5tVEqTf5zw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to