Git Product home page Git Product logo

Comments (2)

isteven avatar isteven commented on July 21, 2024

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.

isteven avatar isteven commented on July 21, 2024

On a second thought, this hack is not pretty but might work:

In your controller:

  1. Prepare an empty array variable for the input model, say $scope.inputModel
  2. Not necessary, but you can set a simple flag, say $scope.gotData = false;

In your view:

  1. 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 to true. If not, set to false.
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.