Closed logicunit closed 8 years ago
I was able to reproduce the issue, it seems that it is only happening when ngAnimate
is enabled.
In the demo is working properly since ngAnimate
is not loaded.
I researched a little more and found out that tr
element doesn't allow height animations, and @khan4019 hacked through this by setting display: block;
when animation starts, which is causing the flickering.
I'm looking forward some other way to fix this but I don't promise it will be done by today :D
Hi @diosney,
Any update on this flickering issue? Am also facing the same.
Thanks, Mathan,
I had similar issue. We wanted quicker response anyway and thus excluded ng-animate, but I couldn't find a workaround with ng-animate.
Yes, indeed the tree flickers on expand with ng-animate. Here is the solution that worked for me. Add the following to your app.js -
angular.module('Application', ['ngAnimate'])
.config(function($animateProvider) {
$animateProvider.classNameFilter(/^(?:(?!ng-animate-disabled).)*$/);
});
see detailed post about above here - http://davidchin.me/blog/disable-nganimate-for-selected-elements/
Then, either in a custom template, or in the tree-grid-directive.js file, add the ng-animate-disabled class to the ng-repeat as shown below. This will disable animations on the tree expansions and thus remove the flicker.
<tbody>\n" + " <tr ng-repeat=\"row in tree_rows | searchFor:$parent.filterString:expandingProperty:colDefinitions track by row.branch.uid\"\n" + " ng-class=\"'level-' + {{ row.level }} + (row.branch.selected ? ' active':'')\" class=\"tree-grid-row ng-animate-disabled\">\n" + " <td><a ng-click=\"user_clicks_branch(row.branch)\"><i ng-class=\"row.tree_icon\"\n" +
Workaround supplied - closing due to age.
@manaswi Its a nice workaround, but its not working for me when my app.js is inside my bundling and minifaction login. Its stange coz my app.js looks same both when minified and otherwise. What could be the reason. I get this error:
Hello,
My grid flickers for some reason when i expend or collapse the node. It almost looks like as if the child nodes are rebuilding one buy one? It works great in your demo. Any idea why it may be flickering with in my app?
thanks you