React-select: Any way to disable client side filtering for Async

Created on 9 May 2017  路  2Comments  路  Source: JedWatson/react-select

I'm creating an autocomplete/ suggestion tool that fetches options from the server. Some of the options are synonyms and do not exactly match what the user is typing and it seems like these are automatically being filtered out. Is there anyway to disable this behavior and just display the results from the server? I don't see any options listed to do this.

Thanks!

Most helpful comment

Thank you, I was wondering why my results were not showing. I found a way to diable the client filtering by setting a custom filter function as follows:

filterOptions={(options, filter, current_values)=>{return options;}}

Where options is the complete array, filter is the user input and current_values are the currently selected values.

All 2 comments

Thank you, I was wondering why my results were not showing. I found a way to diable the client filtering by setting a custom filter function as follows:

filterOptions={(options, filter, current_values)=>{return options;}}

Where options is the complete array, filter is the user input and current_values are the currently selected values.

That worked for me! Thanks :)

Was this page helpful?
0 / 5 - 0 ratings