Skip to content
New issue

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

ignorePunctuation #230

Closed
derwaldgeist opened this issue Sep 14, 2017 · 4 comments
Closed

ignorePunctuation #230

derwaldgeist opened this issue Sep 14, 2017 · 4 comments

Comments

@derwaldgeist
Copy link

I am using your great package to do a suggest search on OpenStreetMap data. Here, it is quite common that the results contain additional information. For instance, instead of

Berlin

you would return

Berlin (Germany)

In the default setup, the user is forced to type the brackets. Otherwise, the result would be filtered out. This is unintuitive.

I've seen that there is an option to add a custom filter. But I think filtering punctuation (i.e. everything except letters and numbers) is quite a common usecase. So it would be great if there was an option for this. IMHO, this should even be the default setting.

@ericgio
Copy link
Owner

ericgio commented Sep 27, 2017

I'll leave this open for discussion, but it's unlikely I'll add this in the near future. I actually don't think it's all that common of a use case and as you point out, there are already ways to work around it.

@ericgio ericgio changed the title Feature request: ignorePunctuation ignorePunctuation Nov 2, 2017
@ericgio ericgio removed the discussion label Nov 2, 2017
@aikidoshi
Copy link

I'm having a similar problem, my users want to search using surname, firstname because it is common practice e.g., Ni, Emma
Problem is that the comma is processed correctly and the results are loaded into the options array in State but are then NOT displayed by the AsyncTypeAhead component. Same if I use a space instead of a comma.
This is surprisingly a big issue apparently, we have a 100 cheungs and even more nguyens.
Please advise.
Regards,
Steve (aikidoshi) Bond

@ericgio
Copy link
Owner

ericgio commented Nov 20, 2017

@aikidoshi: As noted above, filterBy allows you to write a custom filter for your data.

@ericgio
Copy link
Owner

ericgio commented Mar 13, 2019

Unless I'm missing something or there's a use case I'm not aware of, I believe the filterBy prop addresses this issue. Closing for now.

@ericgio ericgio closed this as completed Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants