-
@@ -617,14 +690,14 @@ export default function EditDescriptorModelProperties(props) {
let field;
const valuePath = path.slice();
// create a unique field Id for use as react component keys and html element ids
- // notes:
+ // notes:
// keys only need to be unique on components in the same array
// html element ids should be unique with the document (or form)
let fieldId = uniqueId;
if (isArray) {
valuePath.push(index);
- fieldId += index;
+ fieldId = isLeafList ? fieldId + index + value : resolveReactKey(value);
}
if (isMetaField) {
@@ -682,7 +755,7 @@ export default function EditDescriptorModelProperties(props) {
value = utils.resolvePath(container.model, ['uiState.choice'].concat(path, 'selected').join('.'));
if(!value) {
property.properties.map(function(p) {
- let pname = p.properties[0].name;
+ let pname = p.properties[0] && p.properties[0].name;
if(container.model.hasOwnProperty(pname)) {
value = container.model[pname];
}
@@ -728,11 +801,7 @@ export default function EditDescriptorModelProperties(props) {
Basic
- {basicProperties.map(property => {
- const path = [property.name];
- const value = container.model[property.name];
- return build(container, property, path, value);
- })}
+ {buildComponentsForProperties(container, basicProperties, [], container.model)}
);
@@ -752,11 +821,7 @@ export default function EditDescriptorModelProperties(props) {
less…
- {properties.map(property => {
- const path = [property.name];
- const value = container.model[property.name];
- return build(container, property, path, value, {toggle: true, width: props.width});
- })}
+ {buildComponentsForProperties(container, properties, [], container.model, {toggle: true, width: props.width})}
We need this so when the user closes the panel it won't shift away and scare the bj out of them!
@@ -786,4 +851,3 @@ export default function EditDescriptorModelProperties(props) {
);
};
-