Open JeanneGrenet opened 2 weeks ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
start-ui | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Nov 7, 2024 4:57pm |
The changes in this pull request involve modifications to the zFormSchema
function, where the color
field is updated from a required enum to a nullable enum, allowing null
values. A new story named Clearable
is introduced in the documentation for the FieldSelect
component, demonstrating a clearable selection option. Additionally, the onChange
event handler of the Select
component is updated to handle the clear action by setting the value to null
when the action type is 'clear'.
File Path | Change Summary |
---|---|
src/components/Form/FieldSelect/docs.stories.tsx |
Updated zFormSchema to make color nullable. Added new story Clearable demonstrating clearable selection. |
src/components/Form/FieldSelect/index.tsx |
Modified onChange handler to set value to null on clear action; added comment regarding TypeScript error on selectProps . |
sequenceDiagram
participant User
participant FieldSelect
participant zFormSchema
User->>FieldSelect: Select color option
FieldSelect->>zFormSchema: Validate color selection
zFormSchema-->>FieldSelect: Return selected color
FieldSelect-->>User: Display selected color
User->>FieldSelect: Clear selection
FieldSelect->>FieldSelect: Check action type
FieldSelect->>FieldSelect: Set value to null
FieldSelect-->>User: Display no selection
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Describe your changes
Fix the select with the clearable props. The value was not set to null when the field was cleared
Screenshots
https://github.com/user-attachments/assets/3726b407-8961-44fc-bae9-4def318b3cb4
Summary by CodeRabbit
New Features
Bug Fixes