googlearchive / paper-dialog

A dialog à la Material Design
19 stars 16 forks source link

Keeping paper-dialog opened property in sync on toggle #12

Closed sfeast closed 9 years ago

sfeast commented 9 years ago

If the overlay is toggled directly then the dialog's opened property gets out of sync since it's used in conditional attribute syntax. Actually was moving things over to conditional syntax intended on the core-overlay element here since it appears it creates a one way binding no?

morethanreal commented 9 years ago

Apparently, opened?="{{opened}}" is an attribute binding and they are one-way. I would prefer to fix this issue by making the binding two-way bindings instead of copying the body of the function, ie.

<core-overlay id="overlay" opened="{{opened}}" autoCloseDisabled="{{autoCloseDisabled}}" backdrop="{{backdrop}}" layered="{{layered}}" target="{{}}" sizingTarget="{{$.container}}" closeSelector="{{closeSelector}}" transition="{{transition}}" margin="20"></core-overlay>
morethanreal commented 9 years ago

This isn't an issue now that paper-dialog inherits from core-overlay.