Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
38 changes: 21 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,48 +17,52 @@ should change the heading of the (upcoming) version to include a major version b
-->
# 6.0.2

## @rjsf/shadcn
## @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))
- Updated `ArrayFieldTemplate` and `ObjectFieldTemplate` to remove the rendering of a duplicate description (since the `FieldTemplate` already does it), fixing [#3624](https://github.com/rjsf-team/react-jsonschema-form/issues/3624)

## @rjsf/semantic-ui
## @rjsf/chakra-ui

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

## @rjsf/react-bootstrap
## @rjsf/core

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

## @rjsf/primereact
## @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/mantine

- Updated `CheckboxWidget` to handle label and description rendering consistently, 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
## @rjsf/primereact

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

## @rjsf/fluentui-rc
## @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/antd
## @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/shadcn

## @rjsf/chakra-ui

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

## @rjsf/core
## Dev / docs / playground

- 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))
- Updated the `OptionsDrawer` of the playground to add `idPrefix` and `idSeparator` fields

# 6.0.1

Expand Down
20 changes: 0 additions & 20 deletions packages/antd/src/templates/ArrayFieldTemplate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import classNames from 'classnames';
import { Col, Row, ConfigProvider } from 'antd';
import { useContext } from 'react';

const DESCRIPTION_COL_STYLE = {
paddingBottom: '8px',
};

/** The `ArrayFieldTemplate` component is the template used to render all items in an array.
*
* @param props - The `ArrayFieldTemplateProps` props for the component
Expand All @@ -41,11 +37,6 @@ export default function ArrayFieldTemplate<
uiSchema,
} = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>(
'ArrayFieldDescriptionTemplate',
registry,
uiOptions,
);
const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(
'ArrayFieldTitleTemplate',
registry,
Expand Down Expand Up @@ -84,17 +75,6 @@ export default function ArrayFieldTemplate<
/>
</Col>
)}
{(uiOptions.description || schema.description) && (
<Col span={24} style={DESCRIPTION_COL_STYLE}>
<ArrayFieldDescriptionTemplate
description={uiOptions.description || schema.description}
fieldPathId={fieldPathId}
schema={schema}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
)}
<Col className='row array-item-list' span={24}>
{!showOptionalDataControlInTitle ? optionalDataControl : undefined}
{items}
Expand Down
22 changes: 0 additions & 22 deletions packages/antd/src/templates/ObjectFieldTemplate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
StrictRJSFSchema,
UiSchema,
canExpand,
descriptionId,
getTemplate,
getUiOptions,
titleId,
Expand All @@ -20,10 +19,6 @@ import {
import { Col, Row, ConfigProvider } from 'antd';
import { useContext } from 'react';

const DESCRIPTION_COL_STYLE = {
paddingBottom: '8px',
};

/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
* the properties.
Expand All @@ -36,7 +31,6 @@ export default function ObjectFieldTemplate<
F extends FormContextType = any,
>(props: ObjectFieldTemplateProps<T, S, F>) {
const {
description,
disabled,
formData,
fieldPathId,
Expand All @@ -52,11 +46,6 @@ export default function ObjectFieldTemplate<
} = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, uiOptions);
const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(
'DescriptionFieldTemplate',
registry,
uiOptions,
);
const { formContext } = registry;
const showOptionalDataControlInTitle = !readonly && !disabled;
// Button templates are not overridden in the uiSchema
Expand Down Expand Up @@ -132,17 +121,6 @@ export default function ObjectFieldTemplate<
/>
</Col>
)}
{description && (
<Col span={24} style={DESCRIPTION_COL_STYLE}>
<DescriptionFieldTemplate
id={descriptionId(fieldPathId)}
description={description}
schema={schema}
uiSchema={uiSchema}
registry={registry}
/>
</Col>
)}
{!showOptionalDataControlInTitle ? <Col span={24}>{optionalDataControl}</Col> : undefined}
{properties
.filter((e) => !e.hidden)
Expand Down
Loading