Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All ng-select instances are bound to one another. #787

Closed
divdavem opened this issue Sep 4, 2018 · 2 comments · Fixed by #789
Closed

All ng-select instances are bound to one another. #787

divdavem opened this issue Sep 4, 2018 · 2 comments · Fixed by #789

Comments

@divdavem
Copy link

divdavem commented Sep 4, 2018

Describe the bug
All ng-select instances are bound to one another.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://ng-select.github.io/ng-select/
  2. Select something in the first ng-select
  3. Click on the second ng-select
  4. It automatically takes the value selected in the first ng-select.

Expected behavior
Each ng-select should be independent of one another.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Firefox 61 (but it it probably the case in all browsers)
  • Version: 2.7.0

Additional context
This issue probably comes from the latest commit a1ce17f. There seems to be a single instance of the SelectionModel class for the whole application, as it is providedIn: 'root'.

@divdavem divdavem changed the title Single selection model for whole Single selection model for whole application Sep 4, 2018
@divdavem divdavem changed the title Single selection model for whole application All ng-select instances are bound to one another. Sep 4, 2018
@varnastadeus
Copy link
Member

varnastadeus commented Sep 4, 2018

the problem is known, I removed 2.7.0 from npm for now. Just revert to latest version

@adilos
Copy link

adilos commented Sep 4, 2018

+1
I have the same problem. Can you please fix this issue ASAP ?

varnastadeus added a commit that referenced this issue Sep 5, 2018
* fix: use factory to resolve new instance of selection model
fixes #787
jakemdunn pushed a commit to jakemdunn/ng-select that referenced this issue Oct 16, 2018
…t#789)

* fix: use factory to resolve new instance of selection model
fixes ng-select#787
NickMele pushed a commit to NickMele/ng-select that referenced this issue Apr 12, 2019
…t#789)

* fix: use factory to resolve new instance of selection model
fixes ng-select#787
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants