@rjsf/mantine 6.0.0-beta.21 → 6.0.0-beta.23
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/dist/index.cjs +98 -234
- package/dist/index.cjs.map +4 -4
- package/dist/mantine.esm.js +98 -236
- package/dist/mantine.esm.js.map +4 -4
- package/dist/mantine.umd.js +105 -239
- package/lib/templates/ArrayFieldItemTemplate.d.ts +3 -3
- package/lib/templates/ArrayFieldItemTemplate.js +1 -1
- package/lib/templates/ArrayFieldItemTemplate.js.map +1 -1
- package/lib/templates/ArrayFieldTemplate.d.ts +1 -1
- package/lib/templates/ArrayFieldTemplate.js +2 -3
- package/lib/templates/ArrayFieldTemplate.js.map +1 -1
- package/lib/templates/BaseInputTemplate.js +2 -2
- package/lib/templates/BaseInputTemplate.js.map +1 -1
- package/lib/templates/FieldHelpTemplate.js +4 -1
- package/lib/templates/FieldHelpTemplate.js.map +1 -1
- package/lib/templates/ObjectFieldTemplate.js +2 -2
- package/lib/templates/ObjectFieldTemplate.js.map +1 -1
- package/lib/templates/WrapIfAdditionalTemplate.js +2 -4
- package/lib/templates/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/widgets/CheckboxWidget.js +2 -2
- package/lib/widgets/CheckboxWidget.js.map +1 -1
- package/lib/widgets/CheckboxesWidget.js +2 -2
- package/lib/widgets/CheckboxesWidget.js.map +1 -1
- package/lib/widgets/DateTime/AltDateTimeWidget.d.ts +1 -7
- package/lib/widgets/DateTime/AltDateTimeWidget.js +1 -6
- package/lib/widgets/DateTime/AltDateTimeWidget.js.map +1 -1
- package/lib/widgets/DateTime/AltDateWidget.d.ts +1 -7
- package/lib/widgets/DateTime/AltDateWidget.js +6 -39
- package/lib/widgets/DateTime/AltDateWidget.js.map +1 -1
- package/lib/widgets/FileWidget.js +9 -87
- package/lib/widgets/FileWidget.js.map +1 -1
- package/lib/widgets/RadioWidget.js +2 -2
- package/lib/widgets/RadioWidget.js.map +1 -1
- package/lib/widgets/SelectWidget.js +2 -2
- package/lib/widgets/SelectWidget.js.map +1 -1
- package/lib/widgets/TextareaWidget.js +2 -2
- package/lib/widgets/TextareaWidget.js.map +1 -1
- package/package.json +7 -7
- package/src/templates/ArrayFieldItemTemplate.tsx +3 -3
- package/src/templates/ArrayFieldTemplate.tsx +2 -10
- package/src/templates/BaseInputTemplate.tsx +3 -2
- package/src/templates/FieldHelpTemplate.tsx +5 -1
- package/src/templates/ObjectFieldTemplate.tsx +2 -2
- package/src/templates/WrapIfAdditionalTemplate.tsx +4 -10
- package/src/widgets/CheckboxWidget.tsx +2 -1
- package/src/widgets/CheckboxesWidget.tsx +2 -1
- package/src/widgets/DateTime/AltDateTimeWidget.tsx +1 -8
- package/src/widgets/DateTime/AltDateWidget.tsx +6 -71
- package/src/widgets/FileWidget.tsx +20 -112
- package/src/widgets/RadioWidget.tsx +2 -1
- package/src/widgets/SelectWidget.tsx +2 -1
- package/src/widgets/TextareaWidget.tsx +2 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FocusEvent, useCallback } from 'react';
|
|
2
1
|
import {
|
|
3
2
|
ADDITIONAL_PROPERTY_FLAG,
|
|
4
3
|
UI_OPTIONS_KEY,
|
|
@@ -31,8 +30,8 @@ export default function WrapIfAdditionalTemplate<
|
|
|
31
30
|
disabled,
|
|
32
31
|
schema,
|
|
33
32
|
uiSchema,
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
onKeyRenameBlur,
|
|
34
|
+
onRemoveProperty,
|
|
36
35
|
registry,
|
|
37
36
|
children,
|
|
38
37
|
} = props;
|
|
@@ -42,11 +41,6 @@ export default function WrapIfAdditionalTemplate<
|
|
|
42
41
|
const keyLabel = translateString(TranslatableString.KeyLabel, [label]);
|
|
43
42
|
const additional = ADDITIONAL_PROPERTY_FLAG in schema;
|
|
44
43
|
|
|
45
|
-
const handleBlur = useCallback(
|
|
46
|
-
({ target }: FocusEvent<HTMLInputElement>) => onKeyChange(target && target.value),
|
|
47
|
-
[onKeyChange],
|
|
48
|
-
);
|
|
49
|
-
|
|
50
44
|
if (!additional) {
|
|
51
45
|
return (
|
|
52
46
|
<div className={classNames} style={style}>
|
|
@@ -76,7 +70,7 @@ export default function WrapIfAdditionalTemplate<
|
|
|
76
70
|
disabled={disabled || readonly}
|
|
77
71
|
id={`${id}-key`}
|
|
78
72
|
name={`${id}-key`}
|
|
79
|
-
onBlur={!readonly ?
|
|
73
|
+
onBlur={!readonly ? onKeyRenameBlur : undefined}
|
|
80
74
|
/>
|
|
81
75
|
</div>
|
|
82
76
|
</Grid.Col>
|
|
@@ -89,7 +83,7 @@ export default function WrapIfAdditionalTemplate<
|
|
|
89
83
|
iconType='sm'
|
|
90
84
|
className='rjsf-array-item-remove'
|
|
91
85
|
disabled={disabled || readonly}
|
|
92
|
-
onClick={
|
|
86
|
+
onClick={onRemoveProperty}
|
|
93
87
|
uiSchema={buttonUiOptions}
|
|
94
88
|
registry={registry}
|
|
95
89
|
/>
|
|
@@ -26,6 +26,7 @@ export default function CheckboxWidget<
|
|
|
26
26
|
const {
|
|
27
27
|
id,
|
|
28
28
|
name,
|
|
29
|
+
htmlName,
|
|
29
30
|
value = false,
|
|
30
31
|
required,
|
|
31
32
|
disabled,
|
|
@@ -92,7 +93,7 @@ export default function CheckboxWidget<
|
|
|
92
93
|
)}
|
|
93
94
|
<Checkbox
|
|
94
95
|
id={id}
|
|
95
|
-
name={name}
|
|
96
|
+
name={htmlName || name}
|
|
96
97
|
label={labelValue(label || undefined, hideLabel, false)}
|
|
97
98
|
disabled={disabled || readonly}
|
|
98
99
|
required={required}
|
|
@@ -26,6 +26,7 @@ export default function CheckboxesWidget<
|
|
|
26
26
|
>(props: WidgetProps<T, S, F>) {
|
|
27
27
|
const {
|
|
28
28
|
id,
|
|
29
|
+
htmlName,
|
|
29
30
|
value,
|
|
30
31
|
required,
|
|
31
32
|
disabled,
|
|
@@ -95,7 +96,7 @@ export default function CheckboxesWidget<
|
|
|
95
96
|
<Checkbox
|
|
96
97
|
key={i}
|
|
97
98
|
id={optionId(id, i)}
|
|
98
|
-
name={id}
|
|
99
|
+
name={htmlName || id}
|
|
99
100
|
value={String(i)}
|
|
100
101
|
label={option.label}
|
|
101
102
|
disabled={Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps } from '@rjsf/utils';
|
|
2
2
|
|
|
3
|
-
import _AltDateWidget from './AltDateWidget';
|
|
4
|
-
|
|
5
3
|
/** The `AltDateTimeWidget` is an alternative widget for rendering datetime properties.
|
|
6
4
|
* It uses the AltDateWidget for rendering, with the `time` prop set to true by default.
|
|
7
5
|
*
|
|
@@ -13,10 +11,5 @@ export default function AltDateTimeWidget<
|
|
|
13
11
|
F extends FormContextType = any,
|
|
14
12
|
>(props: WidgetProps<T, S, F>) {
|
|
15
13
|
const { AltDateWidget } = props.registry.widgets;
|
|
16
|
-
return <AltDateWidget
|
|
14
|
+
return <AltDateWidget time {...props} />;
|
|
17
15
|
}
|
|
18
|
-
|
|
19
|
-
AltDateTimeWidget.defaultProps = {
|
|
20
|
-
..._AltDateWidget?.defaultProps,
|
|
21
|
-
showTime: true,
|
|
22
|
-
};
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
2
1
|
import {
|
|
3
2
|
ariaDescribedByIds,
|
|
4
3
|
dateRangeOptions,
|
|
5
|
-
parseDateString,
|
|
6
|
-
toDateString,
|
|
7
|
-
getDateElementProps,
|
|
8
4
|
titleId,
|
|
9
5
|
DateObject,
|
|
10
|
-
type DateElementFormat,
|
|
11
6
|
FormContextType,
|
|
12
7
|
RJSFSchema,
|
|
13
8
|
StrictRJSFSchema,
|
|
14
9
|
TranslatableString,
|
|
10
|
+
useAltDateWidgetProps,
|
|
15
11
|
WidgetProps,
|
|
16
12
|
} from '@rjsf/utils';
|
|
17
13
|
import { Flex, Box, Group, Button, Select, Input } from '@mantine/core';
|
|
18
14
|
|
|
19
|
-
function readyForChange(state: DateObject) {
|
|
20
|
-
return Object.values(state).every((value) => value !== -1);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
15
|
/** The `AltDateWidget` is an alternative widget for rendering date properties.
|
|
24
16
|
* @param props - The `WidgetProps` for this component
|
|
25
17
|
*/
|
|
@@ -28,57 +20,9 @@ export default function AltDateWidget<
|
|
|
28
20
|
S extends StrictRJSFSchema = RJSFSchema,
|
|
29
21
|
F extends FormContextType = any,
|
|
30
22
|
>(props: WidgetProps<T, S, F>) {
|
|
31
|
-
const {
|
|
32
|
-
id,
|
|
33
|
-
value,
|
|
34
|
-
required,
|
|
35
|
-
disabled,
|
|
36
|
-
readonly,
|
|
37
|
-
label,
|
|
38
|
-
hideLabel,
|
|
39
|
-
rawErrors,
|
|
40
|
-
options,
|
|
41
|
-
onChange,
|
|
42
|
-
showTime = false,
|
|
43
|
-
registry,
|
|
44
|
-
} = props;
|
|
45
|
-
|
|
23
|
+
const { id, required, disabled, readonly, label, hideLabel, rawErrors, options, registry } = props;
|
|
46
24
|
const { translateString } = registry;
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
useEffect(() => {
|
|
50
|
-
setState(parseDateString(value, showTime));
|
|
51
|
-
}, [showTime, value]);
|
|
52
|
-
|
|
53
|
-
const handleChange = useCallback(
|
|
54
|
-
(property: keyof DateObject, nextValue: any) => {
|
|
55
|
-
const nextState = {
|
|
56
|
-
...state,
|
|
57
|
-
[property]: typeof nextValue === 'undefined' ? -1 : nextValue,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
if (readyForChange(nextState)) {
|
|
61
|
-
onChange(toDateString(nextState, showTime));
|
|
62
|
-
} else {
|
|
63
|
-
setState(nextState);
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
[state, onChange, showTime],
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
const handleSetNow = useCallback(() => {
|
|
70
|
-
if (!disabled && !readonly) {
|
|
71
|
-
const nextState = parseDateString(new Date().toJSON(), showTime);
|
|
72
|
-
onChange(toDateString(nextState, showTime));
|
|
73
|
-
}
|
|
74
|
-
}, [disabled, readonly, showTime, onChange]);
|
|
75
|
-
|
|
76
|
-
const handleClear = useCallback(() => {
|
|
77
|
-
if (!disabled && !readonly) {
|
|
78
|
-
onChange('');
|
|
79
|
-
}
|
|
80
|
-
}, [disabled, readonly, onChange]);
|
|
81
|
-
|
|
25
|
+
const { elements, handleChange, handleClear, handleSetNow } = useAltDateWidgetProps(props);
|
|
82
26
|
return (
|
|
83
27
|
<>
|
|
84
28
|
{!hideLabel && !!label && (
|
|
@@ -87,13 +31,8 @@ export default function AltDateWidget<
|
|
|
87
31
|
</Input.Label>
|
|
88
32
|
)}
|
|
89
33
|
<Flex gap='xs' align='center' wrap='nowrap'>
|
|
90
|
-
{
|
|
91
|
-
|
|
92
|
-
showTime,
|
|
93
|
-
options.yearsRange as [number, number] | undefined,
|
|
94
|
-
options.format as DateElementFormat | undefined,
|
|
95
|
-
).map((elemProps, i) => {
|
|
96
|
-
const elemId = id + '_' + elemProps.type;
|
|
34
|
+
{elements.map((elemProps, i) => {
|
|
35
|
+
const elemId = `${id}_${elemProps.type}`;
|
|
97
36
|
return (
|
|
98
37
|
<Box key={i}>
|
|
99
38
|
<Select
|
|
@@ -103,7 +42,7 @@ export default function AltDateWidget<
|
|
|
103
42
|
disabled={disabled || readonly}
|
|
104
43
|
data={dateRangeOptions<S>(elemProps.range[0], elemProps.range[1]).map((item) => item.value.toString())}
|
|
105
44
|
value={!elemProps.value || elemProps.value < 0 ? null : elemProps.value.toString()}
|
|
106
|
-
onChange={(v) => handleChange(elemProps.type as keyof DateObject, v)}
|
|
45
|
+
onChange={(v) => handleChange(elemProps.type as keyof DateObject, v || undefined)}
|
|
107
46
|
searchable={false}
|
|
108
47
|
allowDeselect={false}
|
|
109
48
|
comboboxProps={{ withinPortal: false }}
|
|
@@ -133,7 +72,3 @@ export default function AltDateWidget<
|
|
|
133
72
|
</>
|
|
134
73
|
);
|
|
135
74
|
}
|
|
136
|
-
|
|
137
|
-
AltDateWidget.defaultProps = {
|
|
138
|
-
showTime: false,
|
|
139
|
-
};
|
|
@@ -1,85 +1,17 @@
|
|
|
1
1
|
import { useCallback } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
dataURItoBlob,
|
|
4
3
|
ariaDescribedByIds,
|
|
5
4
|
FormContextType,
|
|
6
5
|
labelValue,
|
|
7
6
|
RJSFSchema,
|
|
8
7
|
StrictRJSFSchema,
|
|
8
|
+
useFileWidgetProps,
|
|
9
9
|
WidgetProps,
|
|
10
10
|
} from '@rjsf/utils';
|
|
11
11
|
import { FileInput, Pill } from '@mantine/core';
|
|
12
12
|
|
|
13
13
|
import { cleanupOptions } from '../utils';
|
|
14
14
|
|
|
15
|
-
function addNameToDataURL(dataURL: string, name: string) {
|
|
16
|
-
if (dataURL === null) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return dataURL.replace(';base64', `;name=${encodeURIComponent(name)};base64`);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
type FileInfoType = {
|
|
23
|
-
dataURL?: string | null;
|
|
24
|
-
name: string;
|
|
25
|
-
size: number;
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
function processFile(file: File): Promise<FileInfoType> {
|
|
30
|
-
const { name, size, type } = file;
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
const reader = new window.FileReader();
|
|
33
|
-
reader.onerror = reject;
|
|
34
|
-
reader.onload = (event) => {
|
|
35
|
-
if (typeof event.target?.result === 'string') {
|
|
36
|
-
resolve({
|
|
37
|
-
dataURL: addNameToDataURL(event.target.result, name),
|
|
38
|
-
name,
|
|
39
|
-
size,
|
|
40
|
-
type,
|
|
41
|
-
});
|
|
42
|
-
} else {
|
|
43
|
-
resolve({
|
|
44
|
-
dataURL: null,
|
|
45
|
-
name,
|
|
46
|
-
size,
|
|
47
|
-
type,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
reader.readAsDataURL(file);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function processFiles(files: FileList) {
|
|
56
|
-
return Promise.all(Array.from(files).map(processFile));
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function extractFileInfo(dataURLs: string[]): FileInfoType[] {
|
|
60
|
-
return dataURLs.reduce((acc, dataURL) => {
|
|
61
|
-
if (!dataURL) {
|
|
62
|
-
return acc;
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
const { blob, name } = dataURItoBlob(dataURL);
|
|
66
|
-
return [
|
|
67
|
-
...acc,
|
|
68
|
-
{
|
|
69
|
-
dataURL,
|
|
70
|
-
name: name,
|
|
71
|
-
size: blob.size,
|
|
72
|
-
type: blob.type,
|
|
73
|
-
},
|
|
74
|
-
];
|
|
75
|
-
} catch (e) {
|
|
76
|
-
console.log(e);
|
|
77
|
-
// Invalid dataURI, so just ignore it.
|
|
78
|
-
return acc;
|
|
79
|
-
}
|
|
80
|
-
}, [] as FileInfoType[]);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
15
|
/**
|
|
84
16
|
* The `FileWidget` is a widget for rendering file upload fields.
|
|
85
17
|
*
|
|
@@ -104,56 +36,32 @@ export default function FileWidget<T = any, S extends StrictRJSFSchema = RJSFSch
|
|
|
104
36
|
multiple,
|
|
105
37
|
onChange,
|
|
106
38
|
} = props;
|
|
107
|
-
|
|
39
|
+
const { filesInfo, handleChange, handleRemove } = useFileWidgetProps(value, onChange, multiple);
|
|
108
40
|
const themeProps = cleanupOptions(options);
|
|
109
41
|
|
|
110
|
-
const
|
|
42
|
+
const handleOnChange = useCallback(
|
|
111
43
|
(files: any) => {
|
|
112
44
|
if (typeof files === 'object') {
|
|
113
|
-
|
|
114
|
-
const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL);
|
|
115
|
-
if (multiple) {
|
|
116
|
-
onChange(value.concat(newValue));
|
|
117
|
-
} else {
|
|
118
|
-
onChange(newValue[0]);
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
return;
|
|
123
|
-
},
|
|
124
|
-
[multiple, value, onChange],
|
|
125
|
-
);
|
|
126
|
-
|
|
127
|
-
const handleRemoveFile = useCallback(
|
|
128
|
-
(index: number) => {
|
|
129
|
-
if (multiple) {
|
|
130
|
-
const newValue = value.filter((_: any, i: number) => i !== index);
|
|
131
|
-
onChange(newValue);
|
|
132
|
-
} else {
|
|
133
|
-
onChange(undefined);
|
|
45
|
+
handleChange(files);
|
|
134
46
|
}
|
|
135
47
|
},
|
|
136
|
-
[
|
|
48
|
+
[handleChange],
|
|
137
49
|
);
|
|
138
50
|
|
|
139
|
-
const ValueComponent = useCallback(
|
|
140
|
-
(
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return null;
|
|
154
|
-
},
|
|
155
|
-
[handleRemoveFile],
|
|
156
|
-
);
|
|
51
|
+
const ValueComponent = useCallback(() => {
|
|
52
|
+
if (Array.isArray(filesInfo) && filesInfo.length > 0) {
|
|
53
|
+
return (
|
|
54
|
+
<Pill.Group>
|
|
55
|
+
{filesInfo.map((file, index) => (
|
|
56
|
+
<Pill key={index} withRemoveButton onRemove={() => handleRemove(index)}>
|
|
57
|
+
{file.name}
|
|
58
|
+
</Pill>
|
|
59
|
+
))}
|
|
60
|
+
</Pill.Group>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
}, [handleRemove, filesInfo]);
|
|
157
65
|
|
|
158
66
|
return (
|
|
159
67
|
<FileInput
|
|
@@ -167,7 +75,7 @@ export default function FileWidget<T = any, S extends StrictRJSFSchema = RJSFSch
|
|
|
167
75
|
label={labelValue(label || undefined, hideLabel, false)}
|
|
168
76
|
multiple={!!multiple}
|
|
169
77
|
valueComponent={ValueComponent}
|
|
170
|
-
onChange={
|
|
78
|
+
onChange={handleOnChange}
|
|
171
79
|
error={rawErrors && rawErrors.length > 0 ? rawErrors.join('\n') : undefined}
|
|
172
80
|
{...themeProps}
|
|
173
81
|
aria-describedby={ariaDescribedByIds(id)}
|
|
@@ -23,6 +23,7 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
|
|
|
23
23
|
) {
|
|
24
24
|
const {
|
|
25
25
|
id,
|
|
26
|
+
htmlName,
|
|
26
27
|
value,
|
|
27
28
|
required,
|
|
28
29
|
disabled,
|
|
@@ -72,7 +73,7 @@ export default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSc
|
|
|
72
73
|
return (
|
|
73
74
|
<Radio.Group
|
|
74
75
|
id={id}
|
|
75
|
-
name={id}
|
|
76
|
+
name={htmlName || id}
|
|
76
77
|
value={selected}
|
|
77
78
|
label={!hideLabel ? label : undefined}
|
|
78
79
|
onChange={handleChange}
|
|
@@ -23,6 +23,7 @@ export default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFS
|
|
|
23
23
|
) {
|
|
24
24
|
const {
|
|
25
25
|
id,
|
|
26
|
+
htmlName,
|
|
26
27
|
value,
|
|
27
28
|
placeholder,
|
|
28
29
|
required,
|
|
@@ -88,7 +89,7 @@ export default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFS
|
|
|
88
89
|
return (
|
|
89
90
|
<Component
|
|
90
91
|
id={id}
|
|
91
|
-
name={id}
|
|
92
|
+
name={htmlName || id}
|
|
92
93
|
label={labelValue(label || undefined, hideLabel, false)}
|
|
93
94
|
data={selectOptions}
|
|
94
95
|
value={multiple ? (selectedIndexes as any) : (selectedIndexes as string)}
|
|
@@ -23,6 +23,7 @@ export default function TextareaWidget<
|
|
|
23
23
|
const {
|
|
24
24
|
id,
|
|
25
25
|
name,
|
|
26
|
+
htmlName,
|
|
26
27
|
value,
|
|
27
28
|
placeholder,
|
|
28
29
|
required,
|
|
@@ -69,7 +70,7 @@ export default function TextareaWidget<
|
|
|
69
70
|
return (
|
|
70
71
|
<Textarea
|
|
71
72
|
id={id}
|
|
72
|
-
name={name}
|
|
73
|
+
name={htmlName || name}
|
|
73
74
|
value={value || ''}
|
|
74
75
|
placeholder={placeholder || undefined}
|
|
75
76
|
required={required}
|