Giter VIP home page Giter VIP logo

Comments (6)

machineboy2045 avatar machineboy2045 commented on August 24, 2024

It's debatable, but I think this should be the expected behavior. Since a user cannot select an option before it exists, I don't think it should be possible programmatic-ally either.

from angular-selectize.

AvaelKross avatar AvaelKross commented on August 24, 2024

it's not possible on updating options list select item based on current state of related ng-model ?

from angular-selectize.

machineboy2045 avatar machineboy2045 commented on August 24, 2024

It's possible. I'll consider adding it. I'm just debating which is more expected behavior: the current one or the one you are suggesting. For now, you could wrap the part of your page that requires the options in <div ng-if='myOptions.length'></div>. So the block won't be rendered until the options are available

from angular-selectize.

AvaelKross avatar AvaelKross commented on August 24, 2024

yep, with ng-if all works like a charm. Thank you very much, now I can go sleep finally :) Ty for module again!

from angular-selectize.

machineboy2045 avatar machineboy2045 commented on August 24, 2024

You're welcome!

On Tue, Nov 18, 2014 at 5:28 PM, Alexey Smirnov [email protected]
wrote:

yep, with ng-if all works like a charm. Thank you very much, now I can go
sleep finally :) Ty for module again!


Reply to this email directly or view it on GitHub
#16 (comment)
.

from angular-selectize.

Uelb avatar Uelb commented on August 24, 2024

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 deselected.

from angular-selectize.

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.