-
Notifications
You must be signed in to change notification settings - Fork 0
FEAT: adds prop so that the field value is only lowercase #35
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
Conversation
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.
Pull request overview
This PR adds a new onlyLowercase prop to the RhfCombobox component that automatically converts all input values to lowercase when enabled.
- Introduces an
onlyLowercaseboolean prop (defaults tofalse) to control lowercase transformation - Implements a
normalizeValuefunction to centralize the lowercase conversion logic - Ensures all value paths (input changes, value selection, default values, hidden input) consistently apply normalization
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/ui/src/components/RhfCombobox/rhf-combobox.types.tsx | Adds the onlyLowercase optional boolean prop to the component's type definition |
| packages/ui/src/components/RhfCombobox/rhf-combobox.tsx | Implements the normalization logic with a memoized normalizeValue callback and applies it to all value handling paths including state initialization, value changes, input changes, and hidden input values |
| .changeset/shiny-ghosts-argue.md | Documents the feature addition for the changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
rhf-combobox:Adds a prop to the component to work only with lowercase value