React-select: Request for formatCreateLabel

Created on 6 Dec 2018  路  2Comments  路  Source: JedWatson/react-select

I think this is more a feature request rather than an issue.
Can't seem to find an easy way to do this.

  • What's your use case?
    When using formatCreateLabel in CreatableSelect I want to pass my own customized text + the input value from user. So formatCreateLabel should take two params where the inputValue should be optional.

formatCreateLabel={() => 'Add', inputValue }

Most helpful comment

formatCreateLabel already passes input value as the argument.

const formatCreateLabel = (inputValue => 'Add ' + inputValue);

Please close this if this fulfills what you are looking for.

All 2 comments

formatCreateLabel already passes input value as the argument.

const formatCreateLabel = (inputValue => 'Add ' + inputValue);

Please close this if this fulfills what you are looking for.

Yes! Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sampatbadhe picture sampatbadhe  路  3Comments

MindRave picture MindRave  路  3Comments

geraldfullam picture geraldfullam  路  3Comments

MalcolmDwyer picture MalcolmDwyer  路  3Comments

pgoldweic picture pgoldweic  路  3Comments