-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [docTable/row] delay first render until watchers initialize * [docTable/row] emit a renderComplete event, count in table directive * [renderCounter] unify render counting login into directive * [docTable] remove unused var
- Loading branch information
Showing
7 changed files
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import uiModules from 'ui/modules'; | ||
|
||
uiModules | ||
.get('kibana') | ||
.directive('renderCounter', () => ({ | ||
controller($scope, $element) { | ||
let counter = 0; | ||
|
||
const increment = () => { | ||
counter += 1; | ||
$element.attr('render-counter', counter); | ||
}; | ||
|
||
const teardown = () => { | ||
$element.off('renderComplete', increment); | ||
}; | ||
|
||
const setup = () => { | ||
$element.attr('render-counter', counter); | ||
$element.on('renderComplete', increment); | ||
$scope.$on('$destroy', teardown); | ||
}; | ||
|
||
this.disable = () => { | ||
$element.attr('render-counter', 'disabled'); | ||
teardown(); | ||
}; | ||
|
||
setup(); | ||
} | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters