Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,51 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.
-->
# 6.0.2

## @rjsf/shadcn

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/semantic-ui

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/react-bootstrap

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/primereact

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/mui

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/mantine

- Updated `CheckboxWidget` to handle label and description rendering consistently, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/fluentui-rc

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/antd

- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))


## @rjsf/chakra-ui

- Updated `CheckboxWidget` to handle label and description rendering consistently, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

## @rjsf/core

- Fixed duplicate label and description rendering in `CheckboxWidget` by conditionally rendering them based on widget type
- Updated `CheckboxWidget` to handle label and description rendering consistently
- Modified `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742))

# 6.0.1

## Dev / docs / playground
Expand Down
5 changes: 3 additions & 2 deletions packages/antd/src/templates/FieldTemplate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default function FieldTemplate<
} = formContext as GenericObjectType;

const uiOptions = getUiOptions<T, S, F>(uiSchema);

const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>(
'WrapIfAdditionalTemplate',
registry,
Expand All @@ -79,7 +80,7 @@ export default function FieldTemplate<
descriptionProps.extra = descriptionNode;
break;
}

const isCheckbox = uiOptions.widget === 'checkbox';
return (
<WrapIfAdditionalTemplate
classNames={classNames}
Expand All @@ -101,7 +102,7 @@ export default function FieldTemplate<
hasFeedback={schema.type !== 'array' && schema.type !== 'object'}
help={(!!rawHelp && help) || (rawErrors?.length ? errors : undefined)}
htmlFor={id}
label={displayLabel && label}
label={displayLabel && !isCheckbox && label}
labelCol={labelCol}
required={required}
style={wrapperStyle}
Expand Down
Loading