-
Notifications
You must be signed in to change notification settings - Fork 248
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
ng-if breaks inherit-select-classes #179
Comments
Thank you! |
Hi @tjsail33, actually It's working fine. I've even wrote some unit testing to verify the inheritance classes and it's work just fine! PS: I realized that we need to have Check my plunkr: http://plnkr.co/edit/Awq2Ze?p=preview |
Hi @leocaseiro Thanks for looking into this so quickly. I looked at the Plunkr, and it appear that your second chosen is NOT inheriting from the select as I would have expected. There is a |
Exactly, as I said, it doesn't work without a |
Hi @tjsail33 could you please tell me a little more about your scenario? I've noticed that you have disabled="disabled", what else do you have in your settings before run the app? Could you please copy your select settings for me? I guess something like:
|
Here's the jade snippet that creates the select: select.form-group__input(name="eligibleRoles", chosen, multiple, ng-options="role.id as role.display_name for role in userCreateEditCtrl.roles.roles", ng-model="userCreateEditCtrl.currentRoles", inherit-select-classes="true") and the compiled HTML: <select name="eligibleRoles" chosen="chosen" multiple="multiple" ng-options="role.id as role.display_name for role in userCreateEditCtrl.roles.roles" ng-model="userCreateEditCtrl.currentRoles" inherit-select-classes="true" class="form-group__input"></select> |
It's weird, but it's working for me. Maybe something with the ng-options way.... How about chosen and angular version? chosen 1.4.2? http://plnkr.co/edit/3tnKoW?p=preview Sorry, but I'm really struggling to emulate this issue. I'll have to look tonight(Australia) |
Hi @tjsail33 I did some more tests and I realized this happens while I set http://plnkr.co/edit/WQhgCQ?p=preview switch from |
Yes, there's an NG if on the parent. Sent from my iPhone
|
Please, for the time being, are you able to use |
@leocaseiro i'll double check in the AM to confirm that ng-if causes the issue. |
Hi @tjsail33, I think I found a fix for your issue, but I broke all the unit tests. Did For the time being I'm keeping at the branch 176-ng-if-breaks-inherit-select-classes |
For the sake of voicing it, I'm having this same issue except with the width variable. I'm also using an ng-if. During the full page load it doesn't work, but if I make the ng-if false and then true again it seems to get caught in the rebuild. I guess the difference must be the order the JS gets run in those two scenarios sometimes it builds first and sometimes it doesn't. I'm using the ng-if so that the select isn't required while it is hidden (and to prevent from building a bunch of extra selects). |
@loren138, is your scenario similar the one I added at the bottom in my example, right? Would this branch resolve your issue? Can you please try one of those files: /176-ng-if-breaks-inherit-select-classes/dist |
Yes and yes. The dist file you linked to fixes the problem. |
Thanks! Here is a plunker http://plnkr.co/edit/3tnKoW?p=preview with |
Fixed on 1.4.0 release |
as of 1.3.0, the
inherit-select-classes="true"
attribute no longer appears to be working.The text was updated successfully, but these errors were encountered: