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.

limited.map is not a function

See original GitHub issue

I’m following your example for server side search i.e

        <ng-select [items]="serverSideFilterItems"
                   bindLabel="name"
                   [addTag]="true"
                   [multiple]="true"
                   [typeahead]="peopleTypeahead"
                  formControlName="selectedPersons">
        </ng-select>

but I keep getting this error when the second character is input (if I type 1 character there is no error)

ng-select.d.ts.NgSelectComponent.html:22 ERROR TypeError: limited.map is not a function
    at TypeaheadDirective.prepareMatches (typeahead.directive.js:340)
    at TypeaheadDirective.finalizeAsyncCall (typeahead.directive.js:291)
    at SafeSubscriber.eval [as _next] (typeahead.directive.js:237)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:240)
    at SafeSubscriber.next (Subscriber.js:187)
    at Subscriber._next (Subscriber.js:128)
    at Subscriber.next (Subscriber.js:92)
    at MergeMapSubscriber.notifyNext (mergeMap.js:151)
    at InnerSubscriber._next (InnerSubscriber.js:25)
    at InnerSubscriber.Subscriber.next (Subscriber.js:92)

Issue Analytics

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

github_iconTop GitHub Comments

5reactions
anjmaocommented, Feb 1, 2018

@dottodot You are probably using https://github.com/valor-software/ngx-bootstrap/blob/development/src/typeahead/typeahead.directive.ts from valor-software. That is strange implementation to not prefix directive.

3reactions
dottodotcommented, Feb 1, 2018

Yes you are right I had imported ngx-bootstrap/typeahead at some point and forgotten to remove it. Thanks for your help/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular ng-select : selectedItems.map is not a function
When the FormGroup loaded, and this mistaken default was loaded into the ng-select, the error was selectedItems.map is not a function.
Read more >
TypeError: map is not a function in JavaScript | bobbyhadz
The "TypeError: map is not a function" occurs when we call the map() method on an object that is not an array. To...
Read more >
Map.prototype.size - JavaScript - MDN Web Docs - Mozilla
The size accessor property returns the number of elements in a Map object. ... A set accessor function for size is undefined ;...
Read more >
Async map with limited parallelism in Node.js - Alex Ewerlöf
A simple workaround for using async map functions is to use Promose.all() or its ... is an array of objects that tells whether...
Read more >
How to Use Map, Filter, and Reduce in JavaScript - Code
const task_names = tasks.map(function (task, index, array) { ... That makes our code more declarative—it says what to do, not how to do...
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