mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +00:00
[Time Conductor] Submit immediately on picker changes
This commit is contained in:
@ -55,6 +55,7 @@ define(
|
||||
$scope.textInvalid = false;
|
||||
$scope.lastValidValue = $scope.textValue;
|
||||
}
|
||||
$scope.pickerModel = { value: value };
|
||||
}
|
||||
|
||||
function updateFromView(textValue) {
|
||||
@ -66,6 +67,14 @@ define(
|
||||
}
|
||||
}
|
||||
|
||||
function updateFromPicker(value) {
|
||||
$scope.ngModel[$scope.field] = value;
|
||||
updateFromModel(value);
|
||||
if ($scope.structure && $scope.structure.submit) {
|
||||
$scope.structure.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function setFormat(format) {
|
||||
formatter = formatService.getFormat(format || defaultFormat);
|
||||
updateFromModel($scope.ngModel[$scope.field]);
|
||||
@ -82,6 +91,7 @@ define(
|
||||
|
||||
$scope.$watch('structure.format', setFormat);
|
||||
$scope.$watch('ngModel[field]', updateFromModel);
|
||||
$scope.$watch('pickerModel.value', updateFromPicker);
|
||||
$scope.$watch('textValue', updateFromView);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user