Skip to content

Allow check fields and selectable fields to render as required #487#581

Merged
adamkudrna merged 1 commit into
masterfrom
bc/487-render-as-required
Jan 24, 2025
Merged

Allow check fields and selectable fields to render as required #487#581
adamkudrna merged 1 commit into
masterfrom
bc/487-render-as-required

Conversation

@adamkudrna

Copy link
Copy Markdown
Member

Users may find themselves in a situation where the input is not required (i.e. making the input checked), but they also don't want to render the field as optional because not choosing an option can be perfectly valid. For this case, there is the renderAsRequired prop.

This affects CheckboxField, Radio, SelectField, and Toggle.

Closes #487.

@adamkudrna adamkudrna self-assigned this Dec 3, 2024
@github-actions github-actions Bot added the BC Breaking change label Dec 3, 2024
@adamkudrna
adamkudrna requested a review from atmelmicro December 3, 2024 12:48
@adamkudrna
adamkudrna force-pushed the bc/487-render-as-required branch from 47bcb52 to 0f3b935 Compare December 3, 2024 12:50
@mbohal

mbohal commented Dec 3, 2024

Copy link
Copy Markdown
Contributor

I think the feature is good (we need it and we know why), but honestly the docs are very confusing to me.

I think we should talk about it before merging - I will schedule this for our Monday meeting.

@bedrich-schindler

Copy link
Copy Markdown
Contributor

I think the feature is good (we need it and we know why), but honestly the docs are very confusing to me.

I think we should talk about it before merging - I will schedule this for our Monday meeting.

I am approving this as it is fine for me. But I might be influenced by the reason for this change.

But it is true that one more sentence could be helpful. I am missing the detailed explanation why would user might need this and why it is correct approach.

@adamkudrna
adamkudrna force-pushed the bc/487-render-as-required branch from 0f3b935 to 7a65aab Compare December 6, 2024 19:00
Comment thread src/components/CheckboxField/README.md
@adamkudrna
adamkudrna force-pushed the bc/487-render-as-required branch from 9c50f7f to 2758996 Compare January 22, 2025 21:52
@adamkudrna
adamkudrna force-pushed the bc/487-render-as-required branch from 2758996 to 0f2698d Compare January 24, 2025 11:19
Users may find themselves in a situation where the input is
not required (i.e. making the input checked), but they also
don't want to render the field as optional because not
choosing an option can be perfectly valid. For this case,
there is the `renderAsRequired` prop.

This affects `CheckboxField`, `Radio`, `SelectField`, and `Toggle`.

Closes #487
@adamkudrna
adamkudrna force-pushed the bc/487-render-as-required branch from 0f2698d to 14c5146 Compare January 24, 2025 11:23
@adamkudrna
adamkudrna merged commit d0d9758 into master Jan 24, 2025
@adamkudrna
adamkudrna deleted the bc/487-render-as-required branch January 24, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BC Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implicitly required form fields visual

4 participants