Skip to content

Commit 22be9a5

Browse files
Fix small whitespace issue in primereact and updated docs (#4647)
* Fix small whitespace issue in primereact Fixes a small extra whitespace in the `ArrayFieldTemplate` for prime react - Update `@rjsf/primereact` to update `ArrayFieldTemplate` to remove an extra whitespace - Updated the `v6.x upgrade guide.md` to mention the new theme - Updated the `CHANGELOG.md` to add the new theme * - Updated `api-reference/uiSchema.md` to link the Prime React customizations * - Updated the `layoutGrid.tsx` for the prime react theme to make it match the others
1 parent a90854c commit 22be9a5

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ should change the heading of the (upcoming) version to include a major version b
2222

2323
- Set peerDependency for `@ant-design/icons` to `^6.0.0`, fixing [#4643](https://github.com/rjsf-team/react-jsonschema-form/issues/4643)
2424

25+
## @rjsf/primereact
26+
27+
- New theme!
28+
2529
## @rjsf/utils
2630

2731
- Fixed issue where oneOf radio button could not be modified when defaults were set, fixing [#4634](https://github.com/rjsf-team/react-jsonschema-form/issues/4634)

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/docs/docs/api-reference/uiSchema.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,4 +598,5 @@ const uiSchema: UiSchema = {
598598

599599
- [AntD Customization](themes/antd/uiSchema.md)
600600
- [Chakra-UI Customization](themes/chakra-ui/uiSchema.md)
601+
- [PrimeReact Customization](themes/primereact/uiSchema.md)
601602
- [Semantic-UI Customization](themes/semantic-ui/uiSchema.md)

packages/docs/docs/migration-guides/v6.x upgrade guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
## New packages
44

5-
There are 3 new packages added in RJSF version 6:
5+
There are 4 new packages added in RJSF version 6:
66

77
- `@rjsf/daisyui`: This is new theme based on the `daisyui` toolkit
88
- `@rjsf/react-bootstrap`: This is rename of the `bootstrap-4` theme with an upgrade to the latest version of `react-bootstrap`
9+
- `@rjsf/primereact`: This is a new theme based on the `PrimeReact` toolkit
910
- `@rjsf/shadcn`: This is new theme based on the `shadcn` toolkit
1011

1112
## Breaking changes

packages/playground/src/samples/layoutGrid.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1985,6 +1985,7 @@ const layoutGrid: Sample = {
19851985
children: [
19861986
{
19871987
'ui:columns': {
1988+
style: { marginBottom: '18px' },
19881989
children: ['employment'],
19891990
},
19901991
},
@@ -2000,13 +2001,9 @@ const layoutGrid: Sample = {
20002001
},
20012002
},
20022003
{
2003-
'ui:col': {
2004-
children: ['employment.location.city'],
2005-
},
2006-
},
2007-
{
2008-
'ui:col': {
2009-
children: ['employment.location.state'],
2004+
'ui:columns': {
2005+
sm: 6,
2006+
children: ['employment.location.city', 'employment.location.state'],
20102007
},
20112008
},
20122009
],

packages/primereact/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default function ArrayFieldTemplate<
6565
required={required}
6666
registry={registry}
6767
/>
68-
<Fieldset {...rest} className={`${className} ${isFixedItems<S>(schema) ? '' : 'sortable-form-fields'}`}>
68+
<Fieldset {...rest} className={`${className}${isFixedItems<S>(schema) ? '' : ' sortable-form-fields'}`}>
6969
<ArrayFieldDescriptionTemplate
7070
idSchema={idSchema}
7171
description={uiOptions.description || schema.description}

packages/primereact/test/__snapshots__/Array.test.tsx.snap

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ exports[`array fields fixed array 1`] = `
723723
724724
</h5>
725725
<fieldset
726-
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
726+
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
727727
data-pc-name="fieldset"
728728
data-pc-section="root"
729729
errorSchema={{}}
@@ -1840,7 +1840,7 @@ exports[`with title and description fixed array 1`] = `
18401840
18411841
</h5>
18421842
<fieldset
1843-
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
1843+
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
18441844
data-pc-name="fieldset"
18451845
data-pc-section="root"
18461846
errorSchema={{}}
@@ -2711,7 +2711,7 @@ exports[`with title and description from both fixed array 1`] = `
27112711
27122712
</h5>
27132713
<fieldset
2714-
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
2714+
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
27152715
data-pc-name="fieldset"
27162716
data-pc-section="root"
27172717
errorSchema={{}}
@@ -3582,7 +3582,7 @@ exports[`with title and description from uiSchema fixed array 1`] = `
35823582
35833583
</h5>
35843584
<fieldset
3585-
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
3585+
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
35863586
data-pc-name="fieldset"
35873587
data-pc-section="root"
35883588
errorSchema={{}}
@@ -4415,7 +4415,7 @@ exports[`with title and description with global label off fixed array 1`] = `
44154415
44164416
</h5>
44174417
<fieldset
4418-
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
4418+
className="rjsf-field rjsf-field-array rjsf-field-array-fixed-items p-fieldset p-component"
44194419
data-pc-name="fieldset"
44204420
data-pc-section="root"
44214421
errorSchema={{}}

0 commit comments

Comments
 (0)