-
Notifications
You must be signed in to change notification settings - Fork 222
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
this._renderer.removeClass is not a function when using select in certain templates #113
Comments
Will take a look now 😃 |
I can't seem to reproduce this using the demo app - could you please make a plunkr from this template that exhibits the issue? |
It seems like a new issue... look at this (errors in console); if I delete Maybe something change in latest angular version? |
This is a plunkr with the select (not working...) since previous issue. |
Worked out why the new error is happening - add |
Turns out I need to add Are you able to reproduce your error in Plunkr with the |
This is a plunkr. There is something related with the surrounding html, not sure what. My original layout was pretty huge, I did some trimming, if I continue, the |
Check this plunkr, i did two comments in html template (the plunkr works when you remove any of the html elements). I can confirm that there is a issue with my html, but not sure what (maybe cause it is based on semantic-ui pure css?). |
Thank you for the plunkr - have now got it to reproduce properly in the dev environment. This is looking like an incredibly strange error, and I'm certain it is an Angular error. Essentially, the dropdown component (which the select component uses to work) uses a 'secret' component to keep track of the options within itself. That is to say, there is a component that attaches to all The issue is that for some reason, Angular is injecting an instance of the old renderer class, rather than the new one ( I've found an Angular issue that seems to be the same problem, but rather than just leaving this issue blocked will see if there is a workaround. |
Wowwww... That's pretty strange, you are right... Did you notice that adding <ng-template let-option #x>
{{ option.name }}
</ng-template> anywhere on the template make it work? |
Did not notice that, and what an odd way to fix it... Since there is a way to fix it, would you be happy adding that 'workaround markup' to your template, and then we just sit tight and wait for the Angular bug to be fixed? |
Yes, I can workaround like that, but once again, not sure why! 🙈 I would also recommend adding a note or something like that on the ng2-semantic-ui docs, since there maybe more people struggling with this odd issue. |
Good call about a note - will rename this issue rather than add the note in the docs as it doesn't seem to be happening very often. |
@genuinefafa This is apparently fixed in Angular |
yes, it does @edcarroll ! it even works on the plunkr... !!! closing this issue now. |
Brilliant! I still need to add Angular 4.3.1 to the dependencies to ensure this doesn't happen again but can pop that in the next release. |
it is hard to think of it... i mean, you will require latest angular and many might not be able to update because of that... are you sure that's the right move? |
Currently the library requires |
|
I'm using
when trying to do a Search Selection as the docs,
this works
this DOESN'T
there is an error, saying:
I can make a demo project (actually, I'm already doing it... ), but it seems like a patch kind of an issue.
The text was updated successfully, but these errors were encountered: