Skip to content

Conversation

@MayaKirova
Copy link
Contributor

Closes #

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

skrustev
skrustev previously approved these changes Apr 9, 2025
@ChronosSF ChronosSF changed the base branch from master to 19.2.x April 16, 2025 16:59
@ChronosSF ChronosSF dismissed skrustev’s stale review April 16, 2025 16:59

The base branch was changed.

@tishko0 tishko0 added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Apr 22, 2025
Copy link
Member

@damyanpetev damyanpetev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MayaKirova @skrustev @dkamburov
Just in general - don't consider fixes without the appropriate test complete or ready for review, unless the issue can't be reproduced in one. This one definitely can and I'll add it this time, but keep in mind for future PRs :)

export class TemplateWrapperComponent {

public templateFunctions: TemplateFunction[] = [];
public templateRendered = new EventEmitter<any>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct type would be:

Suggested change
public templateRendered = new EventEmitter<any>();
public templateRendered = new EventEmitter<HTMLElement>();

and the typing adjustments following this

Copy link
Member

@damyanpetev damyanpetev Apr 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also subject, cuz not a real Angular component with output so no benefit, just overhead.

this.templateWrapper.templateRendered.subscribe((element) => {
const igComponents = this.config.flatMap(x => [
x.selector,
reflectComponentType(x.component).selector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure you don't need the actual reflected component selectors (i.e. the true Angular igx- components). Actually, those DOM elements won't even have the ngElementStrategy prop to adjust and shouldn't need this patch anyway :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this is applied in general and templateRendered can be pretty intensive, so anything to reduce it (like not doing a flat map or not doing the map here at all) would be nice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, was hoping there might be a cleaner way to make a connection between the templated and parent components, but I'll take this for now. Still, might be worth checking out if we can attach the template element to the lifecycle of the EmbeddedViewRef that created it, so we can distinguish between cached scenarios, though most that make sense (details and HGrid paginator/toolbar are).

@damyanpetev damyanpetev added the squash-merge Merge PR with "Squash and Merge" option label Apr 24, 2025
@damyanpetev damyanpetev merged commit ce789d5 into 19.2.x Apr 24, 2025
3 checks passed
@damyanpetev damyanpetev deleted the mkirova/fix-elements-in-tmpl-2 branch April 24, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💠 grid: elements squash-merge Merge PR with "Squash and Merge" option version: 19.2.x ✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants