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

refactor(*): switch to control flow blocks #14864

Merged
merged 67 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
690b17f
chore(demos): cleanup combo sample and duplicate template names
damyanpetev Oct 1, 2024
aba7962
refactor(*): switch to control flow blocks
damyanpetev Oct 2, 2024
56c942c
fix(day-view): fix row track by function
damyanpetev Oct 2, 2024
45dbbc9
test(radio): correct closing tag after migration
damyanpetev Oct 3, 2024
0d4fbc7
test(stepper): cleanup leftover from control flow migration
damyanpetev Oct 3, 2024
9f24348
fix(time-picker): correct track for collections that contain empty st…
damyanpetev Oct 3, 2024
a8aa75c
test(autocomplete): clean up track error and warnings
damyanpetev Oct 3, 2024
45b6a9d
test(grid): explicit NgTemplateOutlet import with control flow
damyanpetev Oct 3, 2024
68f9715
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Oct 14, 2024
7de744a
chore(demos): migrate addition to tabs sample
damyanpetev Oct 14, 2024
24bfb23
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Oct 16, 2024
6c8bf62
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Oct 23, 2024
c196502
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Nov 11, 2024
353434a
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Nov 25, 2024
70141ce
chore(demos): missed conflict grid state sample update
damyanpetev Nov 25, 2024
e83b780
chore(demos): new sample update
damyanpetev Nov 25, 2024
c97725a
chore(grid): conflict resolution errors
damyanpetev Nov 25, 2024
e9b7856
fix(calendar): for track expression duplicated keys (NG0955)
damyanpetev Nov 25, 2024
c9a9866
chore(demos): calendar sample for track DOM re-creation (NG0956)
damyanpetev Nov 25, 2024
73b51f3
fix(slider): for track expression duplicated keys (NG0955)
damyanpetev Nov 25, 2024
ed2beed
fix(tree): for track expression duplicated keys (NG0955)
damyanpetev Nov 25, 2024
4a23ee4
chore(grid): test merge conflict missed import
damyanpetev Nov 25, 2024
399df5a
test(carousel): fix for track expression duplicated keys (NG0955)
damyanpetev Nov 26, 2024
43787e2
fix(grid,summary): fix track re-creation warning (NG0956)
damyanpetev Nov 26, 2024
34ce36e
test(select): fix for track expression duplicated keys (NG0955)
damyanpetev Nov 26, 2024
2c05694
test(column-group): fix for track expression duplicated keys (NG0955)
damyanpetev Nov 26, 2024
b1b4a21
fix(column-group): duplicate child columns on pin
damyanpetev Nov 27, 2024
9351053
fix(pivot): header row track re-creation warning (NG0956)
damyanpetev Nov 27, 2024
60eefe1
chore(column): remove leftover fdescribe
damyanpetev Nov 28, 2024
43c0c70
test(grid): fix for track expression duplicated keys in columns tests…
damyanpetev Nov 28, 2024
b0d0ec9
test(grid): fix for track expression duplicated keys in MRL test (NG0…
damyanpetev Nov 28, 2024
285610f
test(*): add a check to fail tests causing track warnings
damyanpetev Nov 28, 2024
bf7ac78
test(grid): fix row track re-creation warning (NG0956)
damyanpetev Nov 28, 2024
1e7eecd
refactor(*): move explicit track by identity to core for reuse
damyanpetev Nov 29, 2024
ca2b21a
fix(action-strip): for track re-creation warning on pin (NG0956)
damyanpetev Nov 29, 2024
39659fc
fix(grid): pinned columns for track re-creation warning on state rest…
damyanpetev Nov 29, 2024
a372537
fix(grid): MRL for track re-creation warning on column unpin (NG0956)
damyanpetev Nov 29, 2024
6397e10
fix(grid,filter-row): for track re-creation warning on filter operati…
damyanpetev Nov 29, 2024
d3d516f
fix(grid,filter-row): for track re-creation warning on unary change (…
damyanpetev Nov 29, 2024
9d85432
fix(grid,filter-row): for track re-creation warning on column hide (N…
damyanpetev Nov 29, 2024
211fd9b
fix(group-by-area): for track re-creation warning (NG0956)
damyanpetev Nov 29, 2024
50b5771
fix(tree-grid): for track re-creation warning pinned row crud (NG0956)
damyanpetev Nov 29, 2024
f3ea343
test(grid,filter-row): remove invalid tests
damyanpetev Dec 2, 2024
8849797
test(*): fix global afterEach warn check with karma-parallel
damyanpetev Dec 2, 2024
70b72f9
Merge remote-tracking branch 'origin/19.0.x' into dpetev/control-flow
damyanpetev Dec 3, 2024
1ca916f
test(grid,mrl): fix row track re-creation warning (NG0956)
damyanpetev Dec 4, 2024
4deaf78
Merge remote-tracking branch 'origin/19.0.x' into dpetev/control-flow
damyanpetev Dec 4, 2024
9f659fb
test(grid,mrl): additional for recreation fixes
damyanpetev Dec 4, 2024
81ff65e
Merge remote-tracking branch 'origin/19.0.x' into dpetev/control-flow
damyanpetev Dec 12, 2024
acfcedf
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Jan 20, 2025
0ef21a0
chore(grid): additional migration after merge
damyanpetev Jan 20, 2025
033d24a
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Jan 29, 2025
1231a94
fix(queryBuilder): Apply custom track function, because expressions r…
skrustev Feb 6, 2025
f1345b8
fix(excelSeach): Apply unique ids for ui expressions, to reduce templ…
skrustev Feb 6, 2025
ba73d0d
test(grid): Fix test warning resetting grid columns in some tests.
skrustev Feb 6, 2025
eb19749
test(grid): Remove trackby use in favour of column fields.
skrustev Feb 7, 2025
0ab1049
test(grid): Track sample groups using group name.
skrustev Feb 7, 2025
3627e92
chore(mrl): remove unused import from spec
damyanpetev Feb 12, 2025
21f6328
Merge pull request #15340 from IgniteUI/skrastev/control-flow-grid
damyanpetev Feb 12, 2025
3fa058c
chore(*): Add better identity tracking in pivot templates. (#15342)
MayaKirova Feb 13, 2025
ecfca96
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Feb 14, 2025
3f706d3
Fix failing tests related to control-flow changes. (#15384)
MayaKirova Feb 25, 2025
d7a0b29
chore(demos): combo demo merge cleanup
damyanpetev Feb 25, 2025
ee85518
Merge branch 'master' into dpetev/control-flow
damyanpetev Feb 25, 2025
3926076
Merge remote-tracking branch 'origin/master' into dpetev/control-flow
damyanpetev Feb 25, 2025
c2dc715
fix(query-builder): fix track re-creation warning (NG0956)
damyanpetev Feb 25, 2025
e6435f9
Merge branch 'master' into dpetev/control-flow
gedinakova Feb 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<ng-template *ngFor="let templateFunc of templateFunctions" let-context="context">
<div #container style="display: contents;"></div>
{{ litRender(container, templateFunc, context) }}
</ng-template>
@for (templateFunc of templateFunctions; track templateFunc) {
<ng-template let-context="context">
<div #container style="display: contents;"></div>
{{ litRender(container, templateFunc, context) }}
</ng-template>
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { NgFor } from '@angular/common';
import { ChangeDetectorRef, Component, QueryList, TemplateRef, ViewChildren } from '@angular/core';
import { TemplateRefWrapper } from './template-ref-wrapper';

Expand All @@ -10,15 +9,16 @@ type TemplateFunction = (arg: any) => TemplateResult;
selector: 'igx-template-wrapper',
templateUrl: './wrapper.component.html',
styleUrls: ['./wrapper.component.scss'],
imports: [NgFor]
imports: []
})
export class TemplateWrapperComponent {

public templateFunctions: TemplateFunction[] = [];

/**
* All template refs
* Warning: the first is always the root `ngFor` template. TODO(D.P.): filter it out?
* Warning: the first is always the root `@for` template
* (internally creates one like the old `<ng-template ngFor` would). TODO(D.P.): filter it out?
*/
@ViewChildren(TemplateRef)
public templateRefs: QueryList<TemplateRef<any>>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useAnimation } from '@angular/animations';
import { NgIf } from '@angular/common';
import { Component, ViewChild } from '@angular/core';
import { waitForAsync, TestBed, fakeAsync, ComponentFixture, tick } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
Expand Down Expand Up @@ -401,10 +400,12 @@ describe('Rendering Tests', () => {
</div>
</igx-expansion-panel-body>
</igx-expansion-panel>
<div *ngIf="divChild"></div>
@if (divChild) {
<div></div>
}
</igx-accordion>
`,
imports: [IgxAccordionComponent, IgxExpansionPanelComponent, IgxExpansionPanelHeaderComponent, IgxExpansionPanelBodyComponent, IgxExpansionPanelTitleDirective, NgIf]
imports: [IgxAccordionComponent, IgxExpansionPanelComponent, IgxExpansionPanelHeaderComponent, IgxExpansionPanelBodyComponent, IgxExpansionPanelTitleDirective]
})
export class IgxAccordionSampleTestComponent {
@ViewChild(IgxAccordionComponent) public accordion: IgxAccordionComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="igx-action-strip__actions">
<ng-content #content></ng-content>
<ng-container *ngIf="menuItems.length > 0">
@if (menuItems.length > 0) {
<button
type="button"
igxIconButton="flat"
Expand All @@ -13,20 +13,21 @@
>
<igx-icon family="default" name="more_vert"></igx-icon>
</button>
</ng-container>
}
<igx-drop-down #dropdown>
<igx-drop-down-item
*ngFor="let item of menuItems"
class="igx-action-strip__menu-item"
>
<div class="igx-drop-down__item-template">
<ng-container
*ngTemplateOutlet="
item.templateRef;
context: { $implicit: item }
"
></ng-container>
</div>
</igx-drop-down-item>
@for (item of menuItems; track trackMenuItem(item)) {
<igx-drop-down-item
class="igx-action-strip__menu-item"
>
<div class="igx-drop-down__item-template">
<ng-container
*ngTemplateOutlet="
item.templateRef;
context: { $implicit: item }
"
></ng-container>
</div>
</igx-drop-down-item>
}
</igx-drop-down>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import { IgxIconComponent } from '../icon/icon.component';
import { IgxDropDownItemNavigationDirective } from '../drop-down/drop-down-navigation.directive';
import { IgxToggleActionDirective } from '../directives/toggle/toggle.directive';
import { IgxRippleDirective } from '../directives/ripple/ripple.directive';
import { NgIf, NgFor, NgTemplateOutlet } from '@angular/common';
import { NgTemplateOutlet } from '@angular/common';
import { getCurrentResourceStrings } from '../core/i18n/resources';
import { IgxIconButtonDirective } from '../directives/button/icon-button.directive';
import { IgxActionStripToken } from './token';
import { trackByIdentity } from '../core/utils';

@Directive({
selector: '[igxActionStripMenuItem]',
Expand Down Expand Up @@ -73,8 +74,6 @@ export class IgxActionStripMenuItemDirective {
selector: 'igx-action-strip',
templateUrl: 'action-strip.component.html',
imports: [
NgIf,
NgFor,
NgTemplateOutlet,
IgxIconButtonDirective,
IgxRippleDirective,
Expand Down Expand Up @@ -314,6 +313,9 @@ export class IgxActionStripComponent implements IgxActionStripToken, AfterConten
}
}

/** pin swapping w/ unpin resets the menuItems collection */
protected trackMenuItem = trackByIdentity;

/**
* Close the menu if opened
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
<ng-container *ngIf="!asMenuItem">
@if (!asMenuItem) {
<button type="button" [title]="labelText" igxIconButton="flat" igxRipple (click)="handleClick($event)" (mousedown)="preventEvent($event)">
<igx-icon *ngIf="iconSet" [family]="iconSet" [name]="iconName">{{iconName}}</igx-icon>
<igx-icon *ngIf="!iconSet" >{{iconName}}</igx-icon>
@if (iconSet) {
<igx-icon [family]="iconSet" [name]="iconName">{{iconName}}</igx-icon>
}
@if (!iconSet) {
<igx-icon>{{iconName}}</igx-icon>
}
</button>
</ng-container>
}

<ng-template #menuItemTemplate>
<ng-container *ngIf="asMenuItem">
@if (asMenuItem) {
<div #container [className]="containerClass">
<igx-icon *ngIf="iconSet" [family]="iconSet" [name]="iconName">{{iconName}}</igx-icon>
<igx-icon *ngIf="!iconSet" >{{iconName}}</igx-icon>
@if (iconSet) {
<igx-icon [family]="iconSet" [name]="iconName">{{iconName}}</igx-icon>
}
@if (!iconSet) {
<igx-icon>{{iconName}}</igx-icon>
}
<label igxLabel>{{labelText}}</label>
</div>
</ng-container>
}
</ng-template>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, Input, TemplateRef, ViewChild, Output, EventEmitter, ElementRef, booleanAttribute } from '@angular/core';
import { IgxIconComponent } from '../../icon/icon.component';
import { IgxRippleDirective } from '../../directives/ripple/ripple.directive';
import { NgIf } from '@angular/common';
import { IgxIconButtonDirective } from '../../directives/button/icon-button.directive';

/* blazorElement */
Expand All @@ -10,7 +9,7 @@ import { IgxIconButtonDirective } from '../../directives/button/icon-button.dire
@Component({
selector: 'igx-grid-action-button',
templateUrl: 'grid-action-button.component.html',
imports: [NgIf, IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective]
imports: [IgxRippleDirective, IgxIconComponent, IgxIconButtonDirective]
})
export class IgxGridActionButtonComponent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@

<ng-container *ngIf="isRowContext">
<igx-grid-action-button *ngIf="!disabled && editRow" [asMenuItem]="asMenuItems" iconName="edit" [labelText]="grid.resourceStrings.igx_grid_actions_edit_label" (actionClick)="startEdit($event)"></igx-grid-action-button>
<igx-grid-action-button *ngIf="addRow && isRootRow" [asMenuItem]="asMenuItems" iconName="add_row" iconSet="default" [labelText]="grid.resourceStrings.igx_grid_actions_add_label" (actionClick)="addRowHandler($event)"></igx-grid-action-button>
<igx-grid-action-button *ngIf="addChild && hasChildren" [asMenuItem]="asMenuItems" iconName="add_child" iconSet="default" [labelText]="grid.resourceStrings.igx_grid_actions_add_child_label" (actionClick)="addRowHandler($event, true)"></igx-grid-action-button>
<igx-grid-action-button *ngIf="!disabled && deleteRow" class="igx-action-strip__delete" classNames='igx-action-strip__menu-item--danger' [asMenuItem]="asMenuItems" iconName="delete" [labelText]="grid.resourceStrings.igx_grid_actions_delete_label" (actionClick)="deleteRowHandler($event)"></igx-grid-action-button>
</ng-container>
@if (isRowContext) {
@if (!disabled && editRow) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconName="edit" [labelText]="grid.resourceStrings.igx_grid_actions_edit_label" (actionClick)="startEdit($event)"></igx-grid-action-button>
}
@if (addRow && isRootRow) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconName="add_row" iconSet="default" [labelText]="grid.resourceStrings.igx_grid_actions_add_label" (actionClick)="addRowHandler($event)"></igx-grid-action-button>
}
@if (addChild && hasChildren) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconName="add_child" iconSet="default" [labelText]="grid.resourceStrings.igx_grid_actions_add_child_label" (actionClick)="addRowHandler($event, true)"></igx-grid-action-button>
}
@if (!disabled && deleteRow) {
<igx-grid-action-button class="igx-action-strip__delete" classNames='igx-action-strip__menu-item--danger' [asMenuItem]="asMenuItems" iconName="delete" [labelText]="grid.resourceStrings.igx_grid_actions_delete_label" (actionClick)="deleteRowHandler($event)"></igx-grid-action-button>
}
}

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, ViewChild, OnInit } from '@angular/core';
import { TestBed, waitForAsync } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { NgFor } from '@angular/common';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';

import { configureTestSuite } from '../../test-utils/configure-suite';
Expand Down Expand Up @@ -391,16 +390,18 @@ describe('igxGridEditingActions #grid ', () => {
template: `
<igx-grid #grid [data]="data" [width]="'800px'" [height]="'500px'"
[rowEditable]="true" [primaryKey]="'ID'">
<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
}

<igx-action-strip #actionStrip>
<igx-grid-editing-actions></igx-grid-editing-actions>
</igx-action-strip>
</igx-grid>
`,
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent, NgFor]
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent]
})
class IgxActionStripTestingComponent implements OnInit {
@ViewChild('actionStrip', { read: IgxActionStripComponent, static: true })
Expand Down Expand Up @@ -468,9 +469,11 @@ class IgxActionStripTestingComponent implements OnInit {
template: `
<igx-grid #grid [data]="data" [width]="'800px'" [height]="'500px'"
[rowEditable]="true" [primaryKey]="'ID'">
<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
}

<igx-action-strip #actionStrip>
<igx-grid-pinning-actions></igx-grid-pinning-actions>
Expand All @@ -479,7 +482,7 @@ class IgxActionStripTestingComponent implements OnInit {
</igx-grid>
`,
selector: 'igx-action-strip-pin-edit-component',
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridPinningActionsComponent, IgxGridEditingActionsComponent, NgFor]
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridPinningActionsComponent, IgxGridEditingActionsComponent]
})
class IgxActionStripPinEditComponent extends IgxActionStripTestingComponent {
}
Expand All @@ -488,17 +491,19 @@ class IgxActionStripPinEditComponent extends IgxActionStripTestingComponent {
template: `
<igx-grid #grid [data]="data" [width]="'800px'" [height]="'500px'"
[rowEditable]="true" [primaryKey]="'ID'">
<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
}

<igx-action-strip #actionStrip>
<igx-grid-editing-actions [asMenuItems]='true'></igx-grid-editing-actions>
</igx-action-strip>
</igx-grid>
`,
selector: 'igx-action-strip-edit-menu-component',
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent, NgFor]
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent]
})
class IgxActionStripEditMenuComponent extends IgxActionStripTestingComponent {
}
Expand All @@ -507,9 +512,11 @@ class IgxActionStripEditMenuComponent extends IgxActionStripTestingComponent {
template: `
<igx-grid #grid [data]="dataOneRow" [width]="'800px'" [height]="'500px'"
[rowEditable]="true" [primaryKey]="'ID'">
<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
}

<igx-action-strip #actionStrip>
<igx-grid-pinning-actions></igx-grid-pinning-actions>
Expand All @@ -518,7 +525,7 @@ class IgxActionStripEditMenuComponent extends IgxActionStripTestingComponent {
</igx-grid>
`,
selector: 'igx-action-strip-one-row-component',
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent, IgxGridPinningActionsComponent, NgFor]
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent, IgxGridPinningActionsComponent]
})
class IgxActionStripOneRowComponent extends IgxActionStripTestingComponent {
}
Expand All @@ -527,17 +534,19 @@ class IgxActionStripOneRowComponent extends IgxActionStripTestingComponent {
template: `
<igx-grid #grid [data]="dataOneRow" [width]="'800px'" [height]="'500px'"
[rowEditable]="true" [primaryKey]="'ID'">
<igx-column *ngFor="let c of columns" [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
@for (c of columns; track c) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@for (c of columns; track c) {
@for (c of columns; track c.field) {

<igx-column [sortable]="true" [field]="c.field" [header]="c.field"
[width]="c.width" [pinned]='c.pinned' [hidden]='c.hidden'>
</igx-column>
}

<igx-action-strip #actionStrip>
<igx-grid-editing-actions [asMenuItems]='true'></igx-grid-editing-actions>
</igx-action-strip>
</igx-grid>
`,
selector: 'igx-action-strip-menu-one-row-component',
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent, NgFor]
imports: [IgxGridComponent, IgxColumnComponent, IgxActionStripComponent, IgxGridEditingActionsComponent]
})
class IgxActionStripMenuOneRowComponent extends IgxActionStripTestingComponent {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { IgxGridActionsBaseDirective } from './grid-actions-base.directive';
import { showMessage } from '../../core/utils';
import { addRow, addChild } from '@igniteui/material-icons-extended';
import { IgxGridActionButtonComponent } from './grid-action-button.component';
import { NgIf } from '@angular/common';


/* blazorElement */
Expand All @@ -19,7 +18,7 @@ import { NgIf } from '@angular/common';
selector: 'igx-grid-editing-actions',
templateUrl: 'grid-editing-actions.component.html',
providers: [{ provide: IgxGridActionsBaseDirective, useExisting: IgxGridEditingActionsComponent }],
imports: [NgIf, IgxGridActionButtonComponent]
imports: [IgxGridActionButtonComponent]
})

export class IgxGridEditingActionsComponent extends IgxGridActionsBaseDirective {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<ng-container *ngIf="isRowContext">
<igx-grid-action-button *ngIf="inPinnedArea && pinnedTop" [asMenuItem]="asMenuItems" iconSet="default" iconName="jump_down" [labelText]="grid.resourceStrings.igx_grid_actions_jumpDown_label" (actionClick)="scrollToRow($event)"></igx-grid-action-button>
<igx-grid-action-button *ngIf="inPinnedArea && !pinnedTop" [asMenuItem]="asMenuItems" iconSet="default" iconName="jump_up" [labelText]="grid.resourceStrings.igx_grid_actions_jumpUp_label" (actionClick)="scrollToRow($event)"></igx-grid-action-button>
<igx-grid-action-button *ngIf="!pinned" [asMenuItem]="asMenuItems" iconSet="default" iconName="pin" [labelText]="grid.resourceStrings.igx_grid_actions_pin_label" (actionClick)="pin($event)"></igx-grid-action-button>
<igx-grid-action-button *ngIf="pinned" [asMenuItem]="asMenuItems" iconSet="default" iconName="unpin" [labelText]="grid.resourceStrings.igx_grid_actions_unpin_label" (actionClick)="unpin($event)"></igx-grid-action-button>
</ng-container>
@if (isRowContext) {
@if (inPinnedArea && pinnedTop) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconSet="default" iconName="jump_down" [labelText]="grid.resourceStrings.igx_grid_actions_jumpDown_label" (actionClick)="scrollToRow($event)"></igx-grid-action-button>
}
@if (inPinnedArea && !pinnedTop) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconSet="default" iconName="jump_up" [labelText]="grid.resourceStrings.igx_grid_actions_jumpUp_label" (actionClick)="scrollToRow($event)"></igx-grid-action-button>
}
@if (!pinned) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconSet="default" iconName="pin" [labelText]="grid.resourceStrings.igx_grid_actions_pin_label" (actionClick)="pin($event)"></igx-grid-action-button>
}
@if (pinned) {
<igx-grid-action-button [asMenuItem]="asMenuItems" iconSet="default" iconName="unpin" [labelText]="grid.resourceStrings.igx_grid_actions_unpin_label" (actionClick)="unpin($event)"></igx-grid-action-button>
}
}
Loading
Loading