Giter VIP home page Giter VIP logo

Comments (4)

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

I have made a fix for this issue, it is in my fork, but to make a clean pull request, it seems the previous pull request must be merged.
Maybe I should have made parallel branches, but somehow these fixes are more or less interdependent.

from angular-selectize.

machineboy2045 avatar machineboy2045 commented on June 23, 2024

I don't see how this distinction can be made by the wrapper. How does it know which options in $scope.options are from the user? If $scope.options becomes [] I think the wrapper should delete all options.

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

The wrapper doesn't need to make a distinction. It adds all options in $scope.options via registerOptions, and lets Selectize to add user options via its own addOption, ie. as user options. Ie. the former are "native" options (eg. coming from the server, or hard-coded) and the latter are really the new ones entered manually.
The distinction allows to put back native options to the drop-down if removed from the selection, while user-entered options doesn't go there.
My latest pull request managed proper deletion of options.

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

Honestly, this behavior is very annoying. I have another case where I really want to distinguish original options from typed ones!
I will see if I can rework my PR to fit current v3 version.

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.