mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge pull request #3943 from spalger/visualizeEditorTouch
[visualize] when an agg is closed, 'touch' its form to show it's errors
This commit is contained in:
commit
ee668579a2
1 changed files with 6 additions and 3 deletions
|
@ -21,9 +21,12 @@ define(function (require) {
|
|||
link: function ($scope, $el, attrs, kbnForm) {
|
||||
$scope.$bind('outputAgg', 'outputVis.aggs.byId[agg.id]', $scope);
|
||||
$scope.editorOpen = !!$scope.agg.brandNew;
|
||||
if (!$scope.editorOpen) {
|
||||
$scope.$evalAsync(kbnForm.$setTouched);
|
||||
}
|
||||
|
||||
$scope.$watch('editorOpen', function (open) {
|
||||
// make sure that all of the form inputs are "touched"
|
||||
// so that their errors propogate
|
||||
if (!open) kbnForm.$setTouched();
|
||||
});
|
||||
|
||||
$scope.$watchMulti([
|
||||
'$index',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue