mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[docTable/row] emit a renderComplete event, count in table directive
This commit is contained in:
parent
4945e088c1
commit
641f9af0e3
2 changed files with 8 additions and 1 deletions
|
@ -140,6 +140,7 @@ module.directive('kbnTableRow', function ($compile) {
|
|||
|
||||
// trim off cells that were not used rest of the cells
|
||||
$cells.filter(':gt(' + (newHtmls.length - 1) + ')').remove();
|
||||
$el.trigger('renderComplete');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@ uiModules.get('kibana')
|
|||
infiniteScroll: '=?',
|
||||
filter: '=?',
|
||||
},
|
||||
link: function ($scope) {
|
||||
link: function ($scope, $el) {
|
||||
let notify = new Notifier();
|
||||
$scope.limit = 50;
|
||||
$scope.persist = {
|
||||
|
@ -55,6 +55,12 @@ uiModules.get('kibana')
|
|||
$scope.limit += 50;
|
||||
};
|
||||
|
||||
$el.attr('has-render-count', 'true');
|
||||
$el.attr('render-count', '0');
|
||||
$el.on('renderComplete', () => {
|
||||
$el.attr('render-count', parseInt($el.attr('render-count'), 10) + 1);
|
||||
});
|
||||
|
||||
// This exists to fix the problem of an empty initial column list not playing nice with watchCollection.
|
||||
$scope.$watch('columns', function (columns) {
|
||||
if (columns.length !== 0) return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue