Re: [polymer-dev] Dom-Repeat Render: What is it actually do ?

2016-10-31 Thread Quang Le
Thank you

I did know how to make the change as you suggested (if you look at my whole 
code)
I just want more detail on what the *render *function actually does, in 
order to use it properly.


On Tuesday, November 1, 2016 at 12:37:05 PM UTC+7, Karl Tiedt wrote:
>
> Because you are by passing the binding functionality of Polymer for 
> Objects and Arrays... Because Polymer does not use mutation observers due 
> to performance issues Objects and Arrays have to be notified of changes, 
> this is done by using this.set as described very clearly in the 
> documentation. The below method with the single line, is enough to get what 
> you expected.
>
> // call dom-repeat render
> _renderDREmployees: function() {
>   this.set('employees.0.name',"RENDERED");
> },
>
> -Karl Tiedt
>

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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/98c66ef0-90af-4d85-8cd0-6f53b06c8f4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [polymer-dev] Dom-Repeat Render: What is it actually do ?

2016-10-31 Thread Karl Tiedt
Because you are by passing the binding functionality of Polymer for Objects
and Arrays... Because Polymer does not use mutation observers due to
performance issues Objects and Arrays have to be notified of changes, this
is done by using this.set as described very clearly in the documentation.
The below method with the single line, is enough to get what you expected.

// call dom-repeat render
_renderDREmployees: function() {
  this.set('employees.0.name',"RENDERED");
},

-Karl Tiedt

On Mon, Oct 31, 2016 at 7:34 PM, Quang Le  wrote:

> I was fighting with a nested dom-repeat for the last 2 days.
> I somewhat now know how to re-render when sub-properties changed.
>
> But still don't understand the purpose of the render function.
> I changed the data binded to a dom-repeat, and call the render, but
> nothing happens.
>
> See here
> http://plnkr.co/edit/Y0P5vNxg46t5fX7gJFxU?p=preview
>
> Could somebody explain to me please?
>
> If you could take a look of my example, to see if I do it the right away.
> What could be other ways/proper way to re-render item inside a dom-repeat
> when the data that binded to it was changed outside.
>
> Thank you
>
>
>
> 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 polymer-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/polymer-dev/79cb695c-65cb-4794-80c4-292471cca595%40googlegroups.com
> 
> .
> 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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/CADNgbTHZjSBxcRyW%3DbQTwPVDLB5s%2Btx8szB%2ByapHJd0evnPKgg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[polymer-dev] Dom-Repeat Render: What is it actually do ?

2016-10-31 Thread Quang Le
I was fighting with a nested dom-repeat for the last 2 days.
I somewhat now know how to re-render when sub-properties changed.

But still don't understand the purpose of the render function.
I changed the data binded to a dom-repeat, and call the render, but nothing 
happens.

See here
http://plnkr.co/edit/Y0P5vNxg46t5fX7gJFxU?p=preview

Could somebody explain to me please?

If you could take a look of my example, to see if I do it the right away.
What could be other ways/proper way to re-render item inside a dom-repeat 
when the data that binded to it was changed outside.

Thank you



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 polymer-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/79cb695c-65cb-4794-80c4-292471cca595%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.