add allowsCustomValue to Combobox#495
Draft
AlexErrant wants to merge 1 commit intokobaltedev:mainfrom
Draft
Conversation
👷 Deploy request for kobalte pending review.Visit the deploys page to approve it
|
Member
|
Hey, thanks for the PR draft! I'll look into your suggestions and the best way to implement this. |
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.
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
ComboboxBaseOptionscould be acustomValueValidatorsince it's relatively easy for users to add an emptystringOptionwhich 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!