Questions tagged [angular-ngselect]

Use this tag for the select component native to Angular that accepts multi-select and auto-complete options.

Select component native to Angular that accepts multi-select and auto-complete options

Repository: Github

369 questions
33
votes
10 answers

How to clear ng-select selection

Is it possible to programmatically clear the selection of an ng-select dropdown? I'm wanting the equivalent behaviour of clicking the clear icon, but triggered programmatically. I was expecting a clear() method or something similar, but the…
Tim
  • 5,435
  • 7
  • 42
  • 62
27
votes
5 answers

Angular 5 ng-select how to add two values to 'bindLabel'?

I want to have ng-select with two values in the property bindLabel. I have something like this:
Kacper Kapela
  • 367
  • 2
  • 5
  • 12
25
votes
11 answers

disable angular ng-select window

We are using ng-select in a project and I'm facing the problem that I can't disable the ng-select window. Is it possible to disable it with native code or do I need to find some custom solution?
Bogdan Tushevskyi
  • 712
  • 2
  • 12
  • 25
19
votes
4 answers

How to set default values in ng-select in angular6?

I am using angular6 multi-select which have a list of items coming in an array of objects from angular service on ngOnInit like this which is passing into multi-select : this.sensorTypes = [ { label : "Power", value : "P"}, { label : "Current",…
Fahad Subzwari
  • 2,109
  • 3
  • 24
  • 52
18
votes
2 answers

Add selected items to ng-select with multiple and typeahead

I'm using ng-select to select multiple values from a large list that is remotely loaded depending on what the user types in the box. Here are my requirements: Tags added dynamically Dropdown is not displayed for already selected values. It is only…
eltiare
  • 1,817
  • 1
  • 20
  • 28
13
votes
3 answers

ng-select - Change height

I am using the ng-select library https://github.com/ng-select/ for Angular 5 at version 1.4.2. I want to customize it so the height of the ng-select is smaller. How can this be achieved? I have had a look at customizing with styles at…
sachman
  • 393
  • 1
  • 10
  • 21
10
votes
3 answers

ng-select multi select checkbox with reactive forms in angular 6

Please go through the link(https://ng-select.github.io/ng-select#/multiselect-checkbox) to know ng-select multi select checkbox. I am trying to use the ng-select "Group selects children" in my angular 6 application. I am having problem using…
Tanjore Raj
  • 135
  • 1
  • 1
  • 7
9
votes
1 answer

Cannot read property '$ngoptionlabel' of null when using ng-select

I'm using ng-select to display data which my app has retrieved from an API, but although the data is successfully retrieved nothing is shown in the dropdown. It just says "No items found." In the console I have the following error: ERROR TypeError:…
Tim
  • 5,435
  • 7
  • 42
  • 62
9
votes
1 answer

How to search multiple fields in ng-select?

I want to merge two API fields "code and name" in ng-select dropdown. For example:- Code : MI name : MI 3sPrime Format : MI - MI 3sPrime I used the below code for dropdown Component.Html
Angel Reji
  • 533
  • 2
  • 11
  • 26
9
votes
2 answers

How to search value in ngselect?

From Api, I get the countryName and code as like below eg:- countryName code ----------------------- India IND United States USA Aruba ABW I want to use the ngSelect dropdown and want to display the…
S.Anitha
  • 171
  • 1
  • 1
  • 7
8
votes
4 answers

How to make ng-select remove-and-read-only

In my Angular application, I have an instance of the ng-select widget: If you click on it, by default you can search for items and add more of them to the current selection: I would like to change this default behaviour, in particular: it shouldn…
Francesco Borzi
  • 56,083
  • 47
  • 179
  • 252
8
votes
2 answers

Angular 6 - Unable to run external functions inside a particular function

I'm using ng-select for angular 6. This is the HTML side of it:
Rosenberg
  • 2,424
  • 5
  • 33
  • 56
7
votes
2 answers

ng-select : add an extra option

How can I add an extra item to my ng-select dropdown like the Create New in the following image : This is the current code I have:
B45i
  • 2,368
  • 2
  • 23
  • 33
7
votes
4 answers

How to always display a placeholder of ng-select?

I am using ng-select in my Angular application and have quite an unusual use case. I need to always display the placeholder, even on option selected. With current code the placeholder is replaced with the value of selected option:
unclePutin
  • 71
  • 1
  • 1
  • 2
7
votes
3 answers

ng-select with form control required validation angular 7

I'm using ng-select for dropdown search but I'm unable to get validation if not selecting anything from dropdown. I return like bellow:
Cherry R
  • 89
  • 1
  • 1
  • 7
1
2 3
24 25