Coder Social home page Coder Social logo

Comments (9)

afortaleza avatar afortaleza commented on June 1, 2024 1

@ronzeidman has fixed this issue here https://github.com/ronzeidman/ng2-select/commit/4590bb25d340bb0a085db0f66cd503cf87ed5dcc

from ng2-select.

brendanalexdr avatar brendanalexdr commented on June 1, 2024

Yes I am experiencing this too. I have 7 ng-selects on a page, they all open at once

from ng2-select.

brendanalexdr avatar brendanalexdr commented on June 1, 2024

Yes I am experiencing this too. I have 7 ng-selects on a page, they all open at once

from ng2-select.

brendanalexdr avatar brendanalexdr commented on June 1, 2024

Yes I am experiencing this too. I have 7 ng-selects on a page, they all open at once

from ng2-select.

rlodge avatar rlodge commented on June 1, 2024

I made an attempt, logged above, to fix this. It's a little raw and untested, as I've decided to do something different for the app I'm working on, but at least on the demo page it fixed this bug. It rewrote core parts of the event handling code, and I don't know if the behavior remained 100% the same.

from ng2-select.

joealmeida avatar joealmeida commented on June 1, 2024

I am having the same problem.

@rlodge I know is just a little raw but using [hidden] instead of ngIf will cause errors in IE9/10.

Not sure why *ngIf is not working here. We can use [class.hidden] maybe?

See:
angular/angular#5774

from ng2-select.

rlodge avatar rlodge commented on June 1, 2024

@knifir I wasn't aware of that. My current work projects are targeting only IE 11 & edge.

I unfortunately don't have a lot of time to mess with it at the moment (I've gone a different with the UI I'm working, wrapping the latest release of Selectize in a directive, partly so I could learn more about writing angular 2 directives).

I switched to [hidden] instead of *ngIf because of the way I decided to do detection of which element was clicked in getOffSideClickHandler. The element.contains code was the easiest way to do it, but it didn't work with *ngIf because by the time the click was received by the handler, the element had been removed by angular from the DOM, and so the check was always false. [hidden] was the easy solution to that.

An alternative to [hidden] would be to add a unique class to the element and its children, and use that. E.g. instead of using ui-select to check if you're on the element managed by the current instance of the component, all elements in the template should contain a class of ng2-select-<UUID> or similar, and then check for that instead of element.contains.

from ng2-select.

mpetkov avatar mpetkov commented on June 1, 2024

So when will this fix be merged into the repo?

from ng2-select.

abhishek11210646 avatar abhishek11210646 commented on June 1, 2024

can anyone provide solution for validation in this ng2-select.??????????

from ng2-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.