@rjsf/react-bootstrap 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/react-bootstrap",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "main": "dist/index.js",
5
5
  "module": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -44,6 +44,8 @@ export default function FieldTemplate<
44
44
  if (hidden) {
45
45
  return <div className='hidden'>{children}</div>;
46
46
  }
47
+ const isCheckbox = uiOptions.widget === 'checkbox';
48
+
47
49
  return (
48
50
  <WrapIfAdditionalTemplate
49
51
  classNames={classNames}
@@ -61,14 +63,14 @@ export default function FieldTemplate<
61
63
  registry={registry}
62
64
  >
63
65
  <Form.Group>
64
- {displayLabel && (
66
+ {displayLabel && !isCheckbox && (
65
67
  <Form.Label htmlFor={id} className={rawErrors.length > 0 ? 'text-danger' : ''}>
66
68
  {label}
67
69
  {required ? '*' : null}
68
70
  </Form.Label>
69
71
  )}
70
72
  {children}
71
- {displayLabel && rawDescription && (
73
+ {displayLabel && rawDescription && !isCheckbox && (
72
74
  <Form.Text className={rawErrors.length > 0 ? 'text-danger' : 'text-muted'}>{description}</Form.Text>
73
75
  )}
74
76
  {errors}