Comments (5)
@tachang #16 is not the same issue ?
from angular-selectize.
Kinda. I used #16 to solve some of this. But I also have a drop down that has a value that is not in the initial options.
What is the best method to use? Basically suppose you are selecting from 10000 options. You don't want to load all 10k options. So obviously you do ajax calls with a search query parameter. However when you go to edit the option you selected you need a way to call the server and ask it to load the one currently selected out of the 10000. The load callback of selectize is called on init but before the options are bound. Sorry if this is a bit unclear. Normally I'd expect the load callback to fire with 'this' set to what is current selected so I can do this.getValue().
from angular-selectize.
If you could make a plunkr illustrating this it would help. There seem to be a lot of factors at play.
from angular-selectize.
I already wrote a comment on the issue #16 but as it is closed, let me bring it here :
I also had this issue and I wonder what is the best practice, but I really don't feel like putting ng-if on all my inputs... Imagine the scenario where one would like to use a remote server to provide options to the select, a select can still have a default value even without loading the options from the server at the beginning no ? And also, if it is a multiple select, I can imagine that the options do not match the possible values all the time. If I select Iron man
from a movie API and then start typing spid
, the options returned from the server won't have Iron man
among them but I don't want my value to be unselected.
from angular-selectize.
If you are loading options dynamically via AJAX, then use Angular.extend() to merge them with the existing options in your controller. I still think what you are trying to do can be done with the current design. But feel free to create a Plunkr proving me wrong. :)
from angular-selectize.
Related Issues (20)
- Allow-Clear Option to Clear the selected value
- Restrict enter key to select the options HOT 1
- NPM repo is out of date HOT 2
- How do I select an item programatically? HOT 1
- can't include in entry webpack file....
- Angular missing as dependency in bower.json
- performance ui-select vs angular-selectize demo
- Impossible to select value in angular 1.6.4 HOT 5
- Is there a way to change maxItems value based on user activity? HOT 1
- Two dataway binding does not respect order - Regular select dropdown does HOT 2
- Angular selectize directive - I can't type in input when I select empty option
- selecting data from list and while reomving it doesnot save data on save button angularjs
- Allow edit mode for selected option HOT 1
- Handle large amount of data HOT 1
- selectize does not load
- Selectize does not seem to work in IE11 with older angular versions HOT 3
- Verision 3.0.2 does not have a release in Github HOT 1
- Input styles
- Label field going thru $sce.trustAsHtml() ? HOT 1
- When selectize-input is focused and i click on it - the Dropdown close and open every click. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-selectize.