question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

For Empty Array it should display "Not Found"

See original GitHub issue

Please fill below information if issuing a bug report.

Expected behaviour

When Array is empty it does not show “Not Found” on selection. It shows only if I have array values and my entered values do not match with any of array content.

For Example :

<ng-select [items]="itemList" [multiple]="true" [hideSelected]="true" placeholder="Select Multiple Deals" [(ngModel)]="selectedDealIds"></ng-select>

Actual behaviour

First image is which have values image

Now, from this array I have typed 0 which does not have value. So , it display not found.

image

Now, the below image with no array data. and tried to to find one value. image

  • If my array is empty , and try to enter any value or by default it should display “No Data”

More Info

ng-select version: @ng-select/ng-select@2.11.1

browser: Chrome

reproducible in demo page: Yes

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
manishambashtacommented, Jun 18, 2019

Hi @bitturids , I am facing the same issue but the resolve provided is not working for me. Can you share how you resolve your issue?

@varnastadeus : If you can provide any alternative to this, it would be nice.

0reactions
bitturidscommented, Nov 26, 2018

Thanks. I will try to update this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to display empty arrays as undefined rather than empty
Empty items are seen as non-existing, which is why if you map() over your array it skips the empty items, as opposed to...
Read more >
How to Check if a JavaScript Array is Empty or Not with .length
To check if an array is empty or not, you can use the .length property. The length property sets or returns the number...
Read more >
How to check whether an array is empty using PHP?
If number of elements in array is zero, then it will display empty array. echo "Array is non- empty" ;
Read more >
#CALC! error - Empty array - Microsoft Support
Empty array errors occur when an array formula returns an empty set. For example, =FILTER(C3:D5,D3:D5<100) will return an error because there are no...
Read more >
empty - Manual - PHP
A variable is considered empty if it does not exist or if its value equals ... I normally count() an array, so I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found