Closed OlaviSau closed 8 years ago
Hey, sorry for the slow reply.
Could you perhaps share your complete dropdown template so I could use that for testing? E.g. something like:
{{#rl-dropdown-container class="dropdown"}}
{{#rl-dropdown-toggle class="btn btn-default"}}
Toggle <span class="caret"></span>
{{/rl-dropdown-toggle}}
{{#rl-dropdown tagName="ul" class="dropdown-menu" closeOnChildClick="a:link"}}
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
{{/rl-dropdown}}
{{/rl-dropdown-container}}
But with your inline if-helper added where you are trying to use it.
The issue is probably not having an attr for class, but sadly I don't have my work pc atm. i'll try to get back on you asap :) I worked around it by using an disabled attr.
For anyone stuck with this, I found a quick working solution:
{{#rl-dropdown-toggle class=(concat "btn btn-primary" (if fooBar " disabled"))}}
Select <span class="caret"></span>
{{/rl-dropdown-toggle}}
Thanks @offirgolan, I finally understand the problem now.
I think that's probably the proper solution and I don't think there's anything the addon can do to help with that; it seems like a general Ember problem, rather than something specific to this addon.
Closing this for now, but if anyone has any further thoughts, feel free to reopen.
@RSSchermer I suggest adding a disabled
option on the container. I know thats def. something we need in our app.
All disabled
would do is set disabled="disabled"
on the trigger, and prevent the dropdown from opening.
Just a thought 😸
:+1: I like that and will look into it.
A disabled
attribute has been added to the rl-dropdown-toggle
component as of version 0.10.0.
class="{{ if isGradeNotSelected 'disabled' }}" will render class="{{ if isGradeNotSelected 'disabled' }}