Closed
Description
Say I got something like this:
<dom-module id="what-ever">
<template is="dom-if" if="{{foo.bar}}">
<div>{{someComputedProperty(foo)}}</div>
</template>
<template is="dom-if" if="{{foo.baz}}">
<div>{{someOtherComputedProperty(foo)}}</div>
</template>
</dom-module>
Polymer
someComputedProperty: () ->
# computed some value rely on foo.bar being true
return 'foo.bar is: ' + foo.bar
someOtherComputedProperty: () ->
# computed some value rely on foo.baz being true
return 'foo.baz is: ' + foo.baz
When foo is changing from
{ bar: true, baz: false }
to
{ bar: false, baz: true }
The first template still got rendered, and that may cause some issue, since the method someComputedProperty
always assumes foo.bar
being true.
Additionally it's seems like wasting of performance, since it's rendering a template which should not be.
So I'm wondering is this a bug and what can I do for now.
Thx.
Metadata
Assignees
Labels
No labels