ocket8888 commented on a change in pull request #3952: TP: fixes table headers 
in cdn snapshot view
URL: https://github.com/apache/trafficcontrol/pull/3952#discussion_r331160940
 
 

 ##########
 File path: 
traffic_portal/app/src/modules/private/cdns/config/ConfigController.js
 ##########
 @@ -155,6 +155,14 @@ let ConfigController = function (cdn, currentSnapshot, 
newSnapshot, $scope, $sta
                });
        };
 
+       $scope.tabSelected = function() {
+               // issue 3863 - adjust column headers when tab is selected and 
data table is visible. hacky...sorry...
+               $timeout(function () {
 
 Review comment:
   using `$timeout` triggers an `$apply` and a `$digest` cycle. Since you're 
not changing angular view data and are directly manipulating the DOM with 
JQuery libraries, there's no need to do that. So it'd be more performant to use 
[`window.setTimeout`](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout)
 instead - should have exactly the same syntax.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to