-
Notifications
You must be signed in to change notification settings - Fork 115
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
Sharing options model amongst multiple selectize #63
Comments
The reference to $scope.options was being overwritten. This saves what's returned from the generateOptions function and pushes it to an emptied scope.options while keeping its reference. Resolves machineboy2045#63
This fix breaks when combined with mine, allowing to provide options as an object. Since the object doesn't have (likely) a splice() method, I get a TypeError. Basically: I rename generateOptions to normailzeOptions, because it changes the data in place.
When I have
I can do a pull request with these changes if you want. |
Was broken for options as object.
- Fix machineboy2045#63 - Use registerOption instead of addOption, like Selectize does on initialization
The $watch on scope.options inside of onInitialize wasn't firing for me.
I believe it was because the reference $scope.options in my controller was being overwritten from within angular-selectize here:
I'm going to submit a pull-request with the changes that worked for me - would like to know what you think. Thanks again for this clean directive, Cheers!
The text was updated successfully, but these errors were encountered: