Closed VanTanev closed 6 years ago
One thing worth mentioning: In browser, it seems like everything worked normally without try/catch
around ngSelect.readValue()
, but I couldn't get the tests to run without it for some reason.
Thank you so much for this PR.
Interesting is that my tests passed here. It might be the karma version or some other library breaking changes. I'm pushing a package-lock.json
Test with those versions, please.
@leocaseiro the tests pass, but I just noticed that in the browser everything seems to work without needing the try/catch. If I remove it however, tests fail. Or did you mean that tests passed for you without the try/catch?
This is a better approach to handle #59 and #221.
Instead of relying on chosen open state to decide if
ngModel.$render()
should triggerchosen:update
, we track and compare the actual value of theThis also handles a bug in #221 where chosen would not re-render if the model was updated while the dropdown was opened - http://plnkr.co/edit/Em6utr6t0YEIX699WsLT?p=preview