Giter Site home page Giter Site logo

Comments (9)

joaoneto avatar joaoneto commented on June 14, 2024

I just pushed a patch, could You test with this new version?

from angular-bootstrap-select.

GarPit avatar GarPit commented on June 14, 2024

I have a problem of using this plugin inside ng-repeat. Select was showed up twice.

from angular-bootstrap-select.

nguyer avatar nguyer commented on June 14, 2024

I am seeing the same thing as @GarPit
image

from angular-bootstrap-select.

GarPit avatar GarPit commented on June 14, 2024

Does anyone have a fix for this issue?

from angular-bootstrap-select.

joaoneto avatar joaoneto commented on June 14, 2024

It's probably because of the version of the bootstrap-select, I'll set it version to 1.5.4 in bower.json to maintain compatibility.

see: https://github.com/joaoneto/angular-bootstrap-select/tree/v0.0.x

from angular-bootstrap-select.

joaoneto avatar joaoneto commented on June 14, 2024

No it's not because of the version of the bootstrap-select, I reproduce that bug in http://codepen.io/joaoneto/pen/azoEdG

May be "ng-if" directive conflict... but I don't know what is happening
😞

from angular-bootstrap-select.

joaoneto avatar joaoneto commented on June 14, 2024

Using "compile" function, ngIf, creates a new scope, it duplicates the DOM of bootstrap-select calling the .selectpicker('refresh') in postLink.

codepen fixed, now working with ng-repeat:
http://codepen.io/joaoneto/pen/azoEdG

"ngIf" docs explains: https://docs.angularjs.org/api/ng/directive/ngIf

Note that when an element is removed using ngIf its scope is destroyed and a new scope is created when the element is restored. The scope created within ngIf inherits from its parent scope using prototypal inheritance. An important implication of this is if ngModel is used within ngIf to bind to a javascript primitive defined in the parent scope. In this case any modifications made to the variable within the child scope will override (hide) the value in the parent scope.

c/c @nguyer, @GarPit

from angular-bootstrap-select.

GarPit avatar GarPit commented on June 14, 2024

So the decision is to use "link" instead of "compile", correct?

from angular-bootstrap-select.

joaoneto avatar joaoneto commented on June 14, 2024

@GarPit correct,
Let's make some tests (we can use codepen), to consolidate this approach before release the version 0.1.0

from angular-bootstrap-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.