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.
Closes #491
Name taken from https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#custom-value
I'm seeking approval on the overall architecture of this feature before I flesh out the below 2 features. No sense in building a bunch of logic if it doesn't suit the architecture/goals of this project :)
It requires at least one more
ComboboxBaseOptions
, perhaps namedcustomValueToOption
, that takes a string (e.currentTarget.value
) and returns anOption
.Another
ComboboxBaseOptions
could be acustomValueValidator
since it's relatively easy for users to add an emptystringOption
which probably isn't desirable....now that I think about it some more, an even better path would be to combine the above 2 bulletpoints and call it
customValueParser
(shoutout to this article).I only manually tested using this commit, perhaps more rigorous testing is required - please LMK!