V11: Prevalues as toggles have problems in datatype settings view (#13709)
* format preValues with DataTypeHelper.createPreValuesProps before rendering so they have the 'alias' prop used for input-id to umb-toggle
* preValues are now formatted on fetch so we do not need to do it again
(cherry picked from commit 7aee15d6d1)
This commit is contained in:
committed by
Elitsa Marinovska
parent
ea3668a224
commit
435b6f0650
@@ -76,7 +76,7 @@
|
||||
|
||||
// get pre values
|
||||
dataTypeResource.getPreValues(newDataType.selectedEditor).then(function(preValues) {
|
||||
newDataType.preValues = preValues;
|
||||
newDataType.preValues = dataTypeHelper.createPreValueProps(preValues);
|
||||
vm.dataType = newDataType;
|
||||
vm.loadingDataType = false;
|
||||
});
|
||||
@@ -89,6 +89,7 @@
|
||||
vm.loadingDataType = true;
|
||||
dataTypeResource.getById($scope.model.id).then(function (dataType) {
|
||||
vm.dataType = dataType;
|
||||
vm.dataType.preValues = dataTypeHelper.createPreValueProps(dataType.preValues);
|
||||
vm.loadingDataType = false;
|
||||
});
|
||||
}
|
||||
@@ -106,9 +107,7 @@
|
||||
|
||||
vm.saveButtonState = "busy";
|
||||
|
||||
var preValues = dataTypeHelper.createPreValueProps(vm.dataType.preValues);
|
||||
|
||||
dataTypeResource.save(vm.dataType, preValues, $scope.model.create).then(
|
||||
dataTypeResource.save(vm.dataType, vm.dataType.preValues, $scope.model.create).then(
|
||||
function(newDataType) {
|
||||
$scope.model.dataType = newDataType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user