Skip to content

Commit 3176914

Browse files
committed
Swapped setTimeout for $timeout
1 parent e2fb2fe commit 3176914

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/app/components/dashboards/widget.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const EditTextBoxComponent = {
5252
},
5353
};
5454

55-
function DashboardWidgetCtrl($scope, $location, $uibModal, $window, $rootScope, Events, currentUser) {
55+
function DashboardWidgetCtrl($scope, $location, $uibModal, $window, $rootScope, $timeout, Events, currentUser) {
5656
this.canViewQuery = currentUser.hasPermission('view_query');
5757

5858
this.editTextBox = () => {
@@ -87,7 +87,7 @@ function DashboardWidgetCtrl($scope, $location, $uibModal, $window, $rootScope,
8787

8888
// refresh widget if any parameter value has been updated
8989
if (valuesChanged) {
90-
setTimeout(() => this.refresh(), 0); // must tick for refresh to work
90+
$timeout(() => this.refresh());
9191
}
9292
$scope.$applyAsync();
9393
$rootScope.$broadcast('dashboard.update-parameters');

0 commit comments

Comments
 (0)