Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binding to reflected property #2344

Closed
nazar-pc opened this issue Aug 22, 2015 · 1 comment
Closed

Binding to reflected property #2344

nazar-pc opened this issue Aug 22, 2015 · 1 comment

Comments

@nazar-pc
Copy link
Contributor

%dom-module(id="cs-icon")
    %template
        %template(is="dom-if" if="[[multiple_icons]]")
            X
        %template(is="dom-if" if="[[!multiple_icons]]")
            Y
    %script(src="script.js")
Polymer(
    'is'                : 'cs-icon'
    properties          :
        icon            :
            reflectToAttribute  : true
            type                : String
        multiple_icons  :
            computed    : '_multiple_icons(icon)'
            type        : Boolean
    _multiple_icons : (icon) ->
        icon.split(' ').length > 1
)
<cs-icon icon="[[icon]]"></cs-icon>

Two issues here:

  • eventually neither X nor Y is shown, even though computed multiple_icons is boolean
  • while icon property is reflected, attribute is removed during binding to property

No errors in browser console.
When bind as to attribute, everything works as expected.

@sorvell
Copy link
Contributor

sorvell commented Jan 28, 2016

Closed in favor of #2348.

@sorvell sorvell closed this as completed Jan 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants