-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix(kselect): add item-creation-validator prop [KHCP-13862] #2485
Merged
Conversation
This file contains 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
portikM
requested review from
adamdehaven,
jillztom,
Justineo and
a team
as code owners
October 28, 2024 18:51
✅ Deploy Preview for kongponents-sandbox ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kongponents ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
mihai-peteu
previously approved these changes
Oct 31, 2024
adamdehaven
reviewed
Oct 31, 2024
docs/components/select.md
Outdated
@@ -372,6 +372,67 @@ When used in conjunction with `enableFiltering` set to `true`, KSelect will sugg | |||
<KSelect enable-item-creation enable-filtering placeholder="Try searching for 'service d'" :items="selectItems" /> | |||
``` | |||
|
|||
### itemCreationValidator | |||
|
|||
Prop for passing a function for input validation when item creation is enabled. The function takes query input string as a single parameter and must return a `boolean` value. When a function passed through `itemCreationValidator` returns `false`, the _Add new value_ button will be disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
Prop for passing a function for input validation when item creation is enabled. The function takes query input string as a single parameter and must return a `boolean` value. When a function passed through `itemCreationValidator` returns `false`, the _Add new value_ button will be disabled. | |
Prop for passing a function for input validation when item creation is enabled. | |
The function takes the query input string as a single parameter and must return a `boolean` value. | |
When the function passed through `itemCreationValidator` returns `false`, the "Add new value" button will be disabled. |
Co-authored-by: Adam DeHaven <[email protected]>
adamdehaven
approved these changes
Oct 31, 2024
kongponents-bot
pushed a commit
that referenced
this pull request
Oct 31, 2024
## [9.14.6](v9.14.5...v9.14.6) (2024-10-31) ### Bug Fixes * **kselect:** add item-creation-validator prop [KHCP-13862] ([#2485](#2485)) ([bf31855](bf31855))
🎉 This PR is included in version 9.14.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Summary
Addresses: https://konghq.atlassian.net/browse/KHCP-13862
Adds
itemCreationValidator
prop for validating user input whenenableItemCreation
istrue