@luomus/laji-form 15.1.48 → 15.1.49
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.
|
@@ -81,7 +81,10 @@ class _SchemaField extends React.Component {
|
|
|
81
81
|
const props = this.functionOutputProps || this.props;
|
|
82
82
|
let { schema, uiSchema = {}, formContext, registry } = props, _props = __rest(props, ["schema", "uiSchema", "formContext", "registry"]); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
83
83
|
const { formContext: _formContext } = registry;
|
|
84
|
-
if
|
|
84
|
+
// rjsf displays a duplicate label if 'uniqueItems' is true in some cases. We prevent that here.
|
|
85
|
+
// Example of when it shows duplicate is http://localhost:8083/?id=JX.652&local=true, "Elinympäristö" on gathering
|
|
86
|
+
// level.
|
|
87
|
+
if (props.schema.type === "array" && props.uiSchema && props.uiSchema.items && props.uiSchema.items["ui:field"]) {
|
|
85
88
|
schema = Object.assign(Object.assign({}, schema), { uniqueItems: false });
|
|
86
89
|
}
|
|
87
90
|
const options = utils_1.getUiOptions(uiSchema);
|