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

[Sourcing] Tree table: ngDoCheck() and ChangeDetection gets triggered whenever we hover on table UI container or perform row expansion or collapse #9926

Closed
yixuan-liu opened this issue May 25, 2023 · 0 comments · Fixed by #9991
Assignees
Milestone

Comments

@yixuan-liu
Copy link

yixuan-liu commented May 25, 2023

Is this a bug, enhancement, or feature request?

A bug

Briefly describe your proposal.

We'd like to avoid unnecessary ChangeDetection (CD) being triggered since it will cause bad performance issues while loading large data set into table, or during expand/collapse table rows.

Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)

Current release with Angular 15.

If this is a bug, please provide steps for reproducing it.

  • Create any view with the <fdp-table> component, and add ngDoCheck() to the component class
    ngDoCheck() {
        console.warn('ngDoCheck() invoked...');
    }
  • Write a custom function as follows, inside HTML where the table component resides, and bind it to the [hideItemCount] property in <fdp-table-toolbar> like this [hideItemCount]=onHideItemCount()
    onHideItemCount() {
        console.warn('onHideItemCount invoked...');
        return false;
    }
  • When hover over any area inside the table, noticed that in browser console it logs hundreds of ngDoCheck() invoked...., along with the onHideItemCount invoked... message invoked in HTML from the custom function onHideItemCount()

Screenshot 2023-05-25 at 6 19 53 PM

Please provide relevant source code if applicable.

Is there anything else we should know?

Right now in our component where we use <fdp-table>, we had quite a few function calls being invoked from HTML template. Due to the CD being triggered so often from the <fdp-table>, those functions will be called over 10k of times.
We're already in progress replacing those function calls with custom pipes instead, but still would like the CD issue to be fixed from F-NGX side.

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

Successfully merging a pull request may close this issue.

3 participants