mirror of
https://github.com/nasa/openmct.git
synced 2024-12-19 05:07:52 +00:00
[Forms] Initialize model from form value
Correctly initialize domain object model from form value upon domain object creation. Integration of forms component, WTD-593.
This commit is contained in:
parent
e04b9828ea
commit
9dd0a54568
@ -101,9 +101,8 @@ define(
|
|||||||
newModel.type = type.getKey();
|
newModel.type = type.getKey();
|
||||||
|
|
||||||
// Update all properties
|
// Update all properties
|
||||||
properties.forEach(function (property) {
|
properties.forEach(function (property, index) {
|
||||||
var value = formValue[property.getDefinition().key];
|
property.setValue(newModel, formValue[index]);
|
||||||
property.setValue(newModel, value);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return newModel;
|
return newModel;
|
||||||
|
Loading…
Reference in New Issue
Block a user