Comments (2)
Hi @mhoude ,
Unfortunately the current version does not support data population using AJAX.
I have this feature in mind but probably will only implement it on the next releases.
from angular-multi-select.
On a second thought, this hack is not pretty but might work:
In your controller:
- Prepare an empty array variable for the input model, say
$scope.inputModel
- Not necessary, but you can set a simple flag, say
$scope.gotData = false;
In your view:
- Create a text box for your search input. Put an event listener or on-change here, calling an AJAX function to populate the
$scope.inputModel
as the user types something. If there's data, set$scope.gotData
totrue
. If not, set tofalse
. - Create an instance of this multi-select directive (you can remove the filter element if you want to), but disable it until the AJAX call from number (1) returns something (or after the input model is populated). You can use
is-disabled="!gotData"
attribute to do this.
from angular-multi-select.
Related Issues (20)
- How to add tooltip for each dropdown element? HOT 9
- how to add default text when data is not bound to multiselect? HOT 1
- Reset doesn't set all values' 'ticked' property to false HOT 2
- output-model needn't be a compulsory attribute HOT 4
- Is there any angular 4 version of this available ? HOT 2
- Use same input-model to multiple multiselectors? HOT 4
- Select items from single group only
- XSS attack by option name
- Mutli select not support direction
- how to select all items loaded on the control??
- How to prevent .length == 'undefined' error when populating dropdown via on-open
- Filtering problem when grouped
- Grouping
- Issue injecting multi-select directive into another directive with same scope
- make filter clear button 'x' icon encoded
- Possible to launch dropdown from custom button?
- will it be possible to give remove option to the selected items in the ui HOT 1
- Search not working when grouping is enabled.
- Any ways to dynamically update helper-elements?
- Multiple elements selected when only one is clicked 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-multi-select.