I have the following custom element. From brevity I've included only the relevant bits of code:
<dom-module id="my_custom_element">
<template>
...
</template>
</dom-module>
<script>
Polymer({
is: 'my_custom_element',
properties: {
selecteditem: {
type: String,
value: '',
notify: false
}
},
//other functions
});
Notice that the notify field is set to false on the selecteditem property.
Here is the usage of the custom element:
<my_custom_element id="myElement" selecteditem={{myselecteditem}}></my_custom_element>
If something causes selectedItem property to change from within the custom element, then I would expect the following alert statement to not display the new value, because notify is set to false. However the actual behaviour is that it is displaying the new value. Why is this?
alert($('#myElement').prop('selecteditem'));
In the following article:
https://www.polymer-project.org/1.0/docs/devguide/data-binding.html
it clearly states:
"If the property being bound does not have the notify flag set, only one-way (downward) binding will occur".
But I am experiencing "upward" binding in this scenario.