React-select: Multiselect Accepting Space

Created on 25 Mar 2017  路  5Comments  路  Source: JedWatson/react-select

We should be blocking the space in case of multiselect. Check example githubUsers where after you add the space, it will not search and show the options. Please find the solution here.

Thanks for using react-select!

If you are reporting an error please include a test case that demonstrates the issue you're reporting!
This is very helpful to maintainers in order to help us see the issue you're seeing.

Here is a Plunker you can fork that has react-select loaded and supports JSX syntax:
https://plnkr.co/edit/HTmtER9AMNcPoWhXV707?p=preview

You may also find the online Babel tool quite helpful if you wish to use ES6/ES7 syntax not yet supported by the browser you are using.

Most helpful comment

Wait, why? What if the options in my select contain spaces? What if I want to create a new option with a space?

All 5 comments

Wait, why? What if the options in my select contain spaces? What if I want to create a new option with a space?

@tonisostrat Let me correct you here. I'm not blocking options which contain spaces e.g "Chendler John" I'm blocking when the user just enter the spaces. No way this PR will block the options which contain spaces. You can still create new options with a space in it.

@mansisce What if you are filtering for options that contain spaces? If you can't type a space it would be impossible to do this.

yes, for example if the options are a list of {firstname}/space{lastname} and space is part of the search charachter?

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version.

If you aren't using the latest version of react-select please consider upgrading to see if it resolves any issues you're having.

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pashap picture pashap  路  3Comments

sampatbadhe picture sampatbadhe  路  3Comments

mjuopperi picture mjuopperi  路  3Comments

mbonaci picture mbonaci  路  3Comments

Meesam picture Meesam  路  3Comments