[Creatable] Fix multiple clicks required to create new option#1471
Closed
billyvg wants to merge 44 commits intoJedWatson:masterfrom
Closed
[Creatable] Fix multiple clicks required to create new option#1471billyvg wants to merge 44 commits intoJedWatson:masterfrom
billyvg wants to merge 44 commits intoJedWatson:masterfrom
Conversation
Owner
|
Can you provide a full usage example here? I can't reproduce the behaviour you're seeing. I suspect you're using a custom function newOptionCreator ({ label, labelKey, valueKey }) {
const option = {};
option[valueKey] = label;
option[labelKey] = label;
option.className = 'Select-create-option-placeholder';
return option;
}; |
Author
|
That's correct, we have an option whose |
readme now reflect fact that noResultsText can be a string or a react component
May not be desirable in the long term but adding it for now to simplify things
The calls to setState should be batched, but this protects against an edge-case where they may not be
…se when focusedOption not equal to any element of array
…se when focusedOption not equal to any element of array, IE compatible
- remove attempts to align the tables and just use one space around pipes - add pipes to the front and end of each line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When you attempt to create a new option, it does not have a
valueproperty -- the "Create new label" option also does not have avalueproperty, soisOptionUniquebelieves they are equal.Is this the right place to handle the issue?
Fixes #1327