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

View with 'path' tagName doesn't update classNameBindings after initial load? #11556

Closed
thejchap opened this issue Jun 26, 2015 · 2 comments
Closed

Comments

@thejchap
Copy link
Contributor

A view defined like this will not toggle the active class on the element....it appears to be set when its instantiated, but then not updated after the fact on subsequent changes to the bound property. Wondering if I am missing something?

import Ember from 'ember';

export default Ember.View.extend({
  tagName: 'path',
  classNameBindings: ['active'],
  active: Ember.computed.alias('controller.active'),

  toggleActive: function () {
    var ctrl = this.get('controller');

    setInterval(function () {
      ctrl.toggleProperty('active');

      console.log(`Toggled active class: ${ctrl.get('active')}`);
    }, 500);
  }.on('didInsertElement')
});

See example repo: https://github.com/thejchap/path-classnamebinding-bug

@thejchap
Copy link
Contributor Author

thejchap commented Jul 7, 2015

Hi just wanted to follow up here, happy to close if it's something on my end...

@thejchap
Copy link
Contributor Author

Closing as views are now deprecated....have yet to look into whether or not this affects components as well

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

1 participant