carbon-design-system / carbon-components-angular

An Angular implementation of the Carbon Design System for IBM.
https://angular.carbondesignsystem.com
Apache License 2.0
531 stars 299 forks source link

[Table] [next] [Feature request] Expanded row (template) to be rendered / evaluated when parent row is expanded #2537

Open eduardmarcinco opened 1 year ago

eduardmarcinco commented 1 year ago

Branch: next

Describe in detail the issue you're having.

When using expandable rows, all expanded row templates are being evaluated right away even though they are hidden via CSS style="display: none". This is degrading performance if a complicated template is used and user might not even expand the row. Would it be possible for template to be evaluated / included into the DOM when user actually expands the row? Or if that is not possible for some reason, at least pass some context to template whether it is expanded or not.

https://github.com/carbon-design-system/carbon-components-angular/blob/next/src/table/body/table-expanded-row.component.ts#L33-L35

Is this issue related to a specific component?

Table.

What browser are you working in?

What version of the Carbon Design System are you using?

"carbon-components": "^11.27.0",
"carbon-components-angular": "^5.7.5",

@Akshat55 can you please share your opinion on this?

Thank you!

Akshat55 commented 1 year ago

Makes a lot of sense! Would make it a great addition & improvement to table! I can't give you a deadline on this yet since we are pushing to get all the breaking changes resolved first, but, will definitely track this so we don't forget!