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.

Search on array with element with multiples word

See original GitHub issue

I’ve been trying to make the auto-suggest works on array like this one (elements with multiple word separated by space):

const an_array= [
  {
    f_name: 'Bob Joe',
    year: Mark
  },
  {
    f_name: 'Mike John',
    l_year: 2005
  }
];

I want the autosuggest to suggest me ‘Bob Joe’ when I enter ‘Bob’ (default behavior) but also when I type ‘Joe’. Any idea how to do that?

Thanks.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
moroshkocommented, Nov 14, 2017

Check the “Custom render” example on the Homepage.

0reactions
Skodddycommented, Nov 14, 2017
import AutosuggestHighlightMatch from 'autosuggest-highlight/umd/match';
import AutosuggestHighlightParse from 'autosuggest-highlight/umd/parse'; 

worked

Read more comments on GitHub >

github_iconTop Results From Across the Web

Array search with multiple words - php - Stack Overflow
I have an array like that: ( (0) => Array ( (uid) => '100', (name) => 'Blue t-shirt 4 years', (ean) => '123456'...
Read more >
Four Methods to Search Through Arrays in JavaScript
Learn about four approaches to searching for values in arrays: includes, indexOf, find, and filter methods.
Read more >
Most frequent word in an array of strings - GeeksforGeeks
Most frequent word in an array of strings By Using Nested Loops: · Traverse a loop for each word in the given array...
Read more >
Field as array of tags – multi-word searches don't return results
Hi,. I have a field called 'tags' and the value of field is always an array of tags. The tag format allows for...
Read more >
5. Working with Arrays and Loops - JavaScript Cookbook [Book]
In Example 5-2, an array is created with several elements, including multiple instances of a specific value. The splice method is then used...
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