React-select: Doesn't allow search with asterisk(*) in search text

Created on 7 Jul 2017  路  3Comments  路  Source: JedWatson/react-select

When I am searching data with asterisk(*) character in it, ajax returns the result, but it wont displayed in the select list.

example:
I have search engine which search by starts_with, for partial search I need to add asterisk(*) in front of the string.

  • Apple
  • Pineapple
  • Crusted Apple
  • Bilberry
  • Blackberry

If I search for App it return the following result

  • Apple
  • Crusted Apple

To get Pineapple to included in the list I need to add asterisk in front of apple like *apple

When I add asterisk(*) ajax call returns the result, but the result is not shown in the list.

categorquestion

Most helpful comment

Hi @sampatbadhe you will need to override the filterOptions prop to allow this behavior.

All 3 comments

Hi @sampatbadhe you will need to override the filterOptions prop to allow this behavior.

Thanks @agirton :+1:

Hello -

Thanks for your assistance @sampatbadhe!

In an effort to sustain the react-select project going forward, we're closing issues that appear to have been resolved via community comments or issues that are now redundant based on their age.

However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you, and we'll re-open it if necessary.

Was this page helpful?
0 / 5 - 0 ratings