{valueResponse}
@@ -537,7 +623,7 @@ export default function EditDescriptorModelProperties(props) {
);
}
- function buildLeafListItem(container, property, valuePath, value, index) {
+ function buildLeafListItem(container, property, valuePath, value, uniqueId, index) {
// look at the type to determine how to parse the value
return (
@@ -603,7 +689,7 @@ export default function EditDescriptorModelProperties(props) {
if (isArray) {
valuePath.push(index);
- fieldId += index;
+ fieldId = isLeafList ? fieldId + index + value : resolveReactKey(value);
}
if (isMetaField) {
@@ -635,7 +721,7 @@ export default function EditDescriptorModelProperties(props) {
event.preventDefault();
event.stopPropagation();
this.getRoot().uiState.focusedPropertyPath = path.join('.');
- console.log('property selected', path.join('.'));
+ console.debug('property selected', path.join('.'));
ComposerAppActions.propertySelected([path.join('.')]);
}
@@ -661,7 +747,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];
}
@@ -707,11 +793,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)}
);
@@ -731,11 +813,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!
@@ -764,5 +842,5 @@ export default function EditDescriptorModelProperties(props) {
{buildAdvancedGroup()}