I think that changes for properties of type object/array should not be 
notified when you reset from null to null. Is this correct??

I am trying to migrate the vaadin date time picker to use Polymer 
2.0-preview and was getting a very weird behavior, I've been all afternoon 
trying to pinpoint the problem and the only thing I can say is that I 
believe is related to two way binding marking the selectedDate as changed 
when nothing had changed.

Code from 
https://github.com/Polymer/polymer/blob/2.0-preview/src/properties/property-accessors.html,
 
I added the code in yellow and now it works, am I missing something?

      _shouldPropChange(property, value, old) {
        return (
          // Strict equality check for primitives
          (old !== value && 
           // This ensures old:NaN, value:NaN always returns false
           (old === old || value === value)) ||
          // Objects/Arrays always pass
          (typeof value == 'object' && !(old === value && value === null)) 
//don't notify when changing from null to null
        );

I'd really appreciate if anyone can clarify on this.

Thank you,

Erich von Hauske

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/610de438-1e2c-4ca6-b10a-d8a31a69fcf6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to