Skip to content

fix(igxGrid): Add handling for outlet in case actionstrip is added po…#16873

Open
MayaKirova wants to merge 6 commits intomasterfrom
mkirova/fix-16850
Open

fix(igxGrid): Add handling for outlet in case actionstrip is added po…#16873
MayaKirova wants to merge 6 commits intomasterfrom
mkirova/fix-16850

Conversation

@MayaKirova
Copy link
Copy Markdown
Contributor

@MayaKirova MayaKirova commented Feb 6, 2026

…st init.

Closes #16850

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

@MayaKirova
Copy link
Copy Markdown
Contributor Author

@copilot add a test for this scenario.

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 6, 2026

@MayaKirova I've opened a new pull request, #16874, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 3 commits February 6, 2026 12:20
Co-authored-by: MayaKirova <10397980+MayaKirova@users.noreply.github.com>
test(igxGrid): Add test for actionstrip outlet when added post-init
@MayaKirova MayaKirova marked this pull request as ready for review February 6, 2026 12:39
@MayaKirova MayaKirova requested a review from dkamburov February 6, 2026 12:40
@dkamburov dkamburov requested a review from IMinchev64 February 19, 2026 08:05
Copilot AI review requested due to automatic review settings April 3, 2026 11:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a grid overlay-outlet initialization gap when an IgxActionStrip is added dynamically after the grid has completed content init, addressing the Elements scenario where action-strip menus (as menu items) can close unexpectedly due to incorrect overlay outlet resolution.

Changes:

  • Subscribes to actionStripComponents.changes in IgxGridBaseDirective to (re)apply menuOverlaySettings.outlet when the action strip is added/changed post-init.
  • Adds a new dynamic-action-strip test component in test utilities.
  • Adds a unit test validating the action strip menu outlet is set when the strip is added after init.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
projects/igniteui-angular/grids/grid/src/grid-base.directive.ts Updates grid base lifecycle logic to set action strip menu overlay outlet on dynamic content changes.
projects/igniteui-angular/test-utils/grid-samples.spec.ts Adds a test component that conditionally renders an action strip after initial render.
projects/igniteui-angular/grids/grid/src/grid-add-row.spec.ts Adds a unit test asserting the outlet is applied for dynamically-added action strips.

Comment on lines +4075 to +4079
this.actionStripComponents.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {
if (this.actionStrip) {
this.actionStrip.menuOverlaySettings.outlet = this.outlet;
}
});
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

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

The new actionStripComponents.changes subscription updates the outlet for dynamically added action strips on IgxGridBaseDirective, but the same pattern doesn’t appear to be applied to hierarchical grids. IgxRowIslandComponent overrides actionStripComponents and only assigns menuOverlaySettings.outlet once in ngAfterContentInit (see projects/igniteui-angular/grids/hierarchical-grid/src/row-island.component.ts:401-438), so dynamically adding/removing an action strip there would still leave the menu outlet unset. Consider mirroring this subscription logic (or extracting a shared helper) so the behavior is consistent across grid types.

Copilot uses AI. Check for mistakes.
@dkamburov
Copy link
Copy Markdown
Contributor

@MayaKirova pr to 21.1.x please

@dkamburov dkamburov added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action-strip grid version: 21.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.

[Elements] Action strip menu closes on hover when moving from row to menu

5 participants