We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I think about having a title and a subtilte, which should both be searched but have different formatting.
of course I can do const extract = (item) => ' <h3>' + item.title+ '</h3><p>'+item.subtitle+'</p>':
const extract = (item) => ' <h3>' + item.title+ '</h3><p>'+item.subtitle+'</p>'
But searching for h3 would find (and crash) the html:
h3
So I thought about passing an array into extract and geting an array in result.string back:
const extract = (item) => [ item.title, item.subtitle ];
<Typeahead {data} {extract}> <div> <h3> {result.string[0]}</h3> <h3> {result.string[1]}</h3> </div> </Typeahead>
What do you think about that Idea? To not break things it would be nice to have the ability to pass in an array or a string.
I think this would also need some changes in fuzzy.js, but I dind't looked much into it and thought I'll ask you first.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think about having a title and a subtilte, which should both be searched but have different formatting.
of course I can do
const extract = (item) => ' <h3>' + item.title+ '</h3><p>'+item.subtitle+'</p>'
:But searching for
h3
would find (and crash) the html:So I thought about passing an array into extract and geting an array in result.string back:
What do you think about that Idea?
To not break things it would be nice to have the ability to pass in an array or a string.
I think this would also need some changes in fuzzy.js, but I dind't looked much into it and thought I'll ask you first.
The text was updated successfully, but these errors were encountered: