-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
simpleValue for User-Created Tags Not Working Properly #1502
Comments
I have the same issue. When the user enters a new tag, the state updates correctly but the ui does not add the new tag the user just created, it says "Create option XXXX". This is my Creatable tag:
|
I think the mistake lies on putting the options object in the render method or in your case directly in the Creatable tag. I put the options object in the state and set the Creatable options to this.state.options and now it works just fine. Hope this helps someone! |
I have the same issue with the latest version (1.0.0-rc.5 at the moment). Creatable works fine unless |
Hello - In an effort to sustain the 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. |
why are you closing it? simplevalue does not work for creatable. |
Thanks for the feedback @canercak, much appreciated. |
I've started a fork of react-select. Feel free to resubmit this issue on the fork and/or submit a PR to resolve this issue on the fork and we can get it merged and released. |
In the interest of focusing on functionality and stability for current and future versions, we will be closing this. This issue can always be reopened should anyone have enough interest in creating a PR to address this. |
I am trying to use
simpleValue={true}
for<Creatable />
tags. The pre-written labels work correctly, but when the user types in a custom tag, it does not work. However, they do get written properly to the state, they just don't show up when rendered.<Select.Creatable multi={true} options={[ { label: 'A', value: 'A' }, { label: 'B', value: 'B' }, { label: 'C', value: 'C' }, ]} onChange={this.handleTestTagInput} value={this.props.printTest.testTags} simpleValue={true} />
For the above example. Selecting A, B or C works and displays correctly. Any custom tags that are entered in do not physically show up, but they are registered into the string.
Is this a known issue? Any work around this?
edit: moreover, when I enter in a new custom tag and press my 'enter' key, it deletes all of the previous custom tags and inserts the new one into the string. However, clicking on 'click option' adds it just fine.
The text was updated successfully, but these errors were encountered: