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

"Create Option" text in Creatable is not modifiable by props. #1459

Closed
metti222 opened this issue Jan 3, 2017 · 3 comments
Closed

"Create Option" text in Creatable is not modifiable by props. #1459

metti222 opened this issue Jan 3, 2017 · 3 comments

Comments

@metti222
Copy link

metti222 commented Jan 3, 2017

"Create Option" text in Creatable is not modifiable by props.

@optyler
Copy link

optyler commented Jan 5, 2017

Hi,

I just found how you could achieve that. In my case I want to internationalise the strings with react-intl it gives this code :

in my translation file fr.yml

ReactSelect:
  CreateLabel: Créer {label}?
<Select
    promptTextCreator={(label) => intl.formatMessage({ id: 'ReactSelect.CreateLabel' }, { label })}
/>

@jsnmoon
Copy link

jsnmoon commented Jan 5, 2017

As @optyler has mentioned, the prompt text is modifiable using Creatable's promptTextCreator prop.

However, there is an outstanding bug (#1464) that will pass the entire label as the callback value instead of just the value. Using a custom prompt may not be advisable at this moment.

@bladey
Copy link
Contributor

bladey commented May 27, 2020

Hello -

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

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you feel this issue / pull request 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.

@bladey bladey closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants