Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderComplete Fires Prior to Discover Search Render Completion (Once Per Row?) #26998

Open
Kolano opened this issue Dec 11, 2018 · 2 comments
Open

Comments

@Kolano
Copy link

Kolano commented Dec 11, 2018

Kibana version:
6.5.2

Elasticsearch version:
6.5.2

Server OS version:
Ubuntu 16.04.05

Browser version:
Firefox

Browser OS version:
Windows 10

Original install method (e.g. download page, yum, from source, etc.):
apt

Describe the bug:
I'm noting that renderComplete seems to fire far too frequently for Discover saved searches. It seems to fire as each row is rendered, rather than when rendering completes.

Steps to reproduce:

  1. Load a visualization that includes a Discover search
  2. Load test code via the browser console:
$("doc-table.panel-content").on("renderComplete", function(){
console.log("renderComplete Ran: " + new Date().getTime() );
});
  1. Use the tables paging buttons to force a refresh
  2. Observe ~101 lines logged to the browser Console

Using an alert() in the test pauses things with each iteration that seems to show it occurring as each row is rendered

Expected behavior:
renderComplete would fire once when all table rows had completed rendering.

@lukasolson
Copy link
Member

Is this causing performance issues for you? Or causing some behavior that is undesired?

@Kolano
Copy link
Author

Kolano commented Dec 20, 2018

For me the main issue I have is that I can't use renderComplete to know when things are complete, since they won't be the first time it fires, and there is no way to know if the 20th or 50th time it's run will be the last.

This would be likely to cause performance issues for some scripts, or probably more critically, repeated DOM changes for things that modify the DOM in renderComplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants