tildeio / htmlbars

A variant of Handlebars that emits DOM and allows you to write helpers that manipulate live DOM nodes
MIT License
1.6k stars 193 forks source link

{{link-to}} "disabledWhen" documentation wrong? #413

Closed Fryie closed 9 years ago

Fryie commented 9 years ago

According to the documentation, {{link-to}} should work with a disabledWhen attribute that is evaluated dynamically (as opposed to the "static" disabled attribute). This also used to work in Ember 1.12. However, it doesn't seem to work as advertised: http://ember-twiddle.com/4bcac030ed2c19272271

Changing disabledWhen to disabled seems to work, however, and doesn't seem to be "static" at all (maybe I'm misunderstanding the labels static and dynamic here?).

jcope2013 commented 9 years ago

related? https://github.com/emberjs/ember.js/pull/12344

rwjblue commented 9 years ago

@jcope2013 is correct, https://github.com/emberjs/ember.js/pull/12344 fixed the issue in the Ember release-1-13 branch. So I'm going to go ahead and close...

Fryie commented 9 years ago

sorry, just to follow up: in which release is this fixed? 'cause i'm running ember 1.13.7.

jcope2013 commented 9 years ago

@Fryie add "ember": "#release-1-13" to your bower.json to get it now, it will be included in 1.13.11 but you can get it now by using the release branch (which is 1.13.10 + new fixes)

Fryie commented 9 years ago

sweet, thanks a lot

Fryie commented 9 years ago

just to clarify, though: why does the syntax with "disabled" work, even though it's supposed to be "static" as per the docs? is that also part of the fixed bug?

Fryie commented 9 years ago

just to answer my own question, "disabled" only seems to work: it creates the right css class, so the link looks disabled, but it's actually clickable. I'll try updating ember and changing back to "disabledWhen". :)