-
Notifications
You must be signed in to change notification settings - Fork 160
refactor(*): switch to control flow blocks #14864
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
Conversation
…ecreate for cycle.
Resolve control flow warnings in grid and tree grid.
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
<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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (c of columns; track c) { | |
@for (c of columns; track c.field) { |
@@ -585,10 +584,12 @@ class ButtonGroupWithSelectedButtonComponent { | |||
@Component({ | |||
template: ` | |||
<igx-buttongroup> | |||
<button igxButton *ngFor="let item of items" [selected]="item.key === selectedValue">{{item.value}}</button> | |||
@for (item of items; track item) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@for (item of items; track item) { | |
@for (item of items; track item.key) { |
Closes #15333
Some changes are manual since the migration didn't detect all uses. Also note that I've manually adjusted the default formatting the ng migration does (worse if it doesn't format), but that was far from error-free and I've corrected the more egregious mishaps or redundant changes. Not perfect yet and will be looking into a formatting tool to enforce since the default VS Code formatting doesn't handle these yet microsoft/vscode-html-languageservice#177.
Also there are an alarming number of warnings for the
track
handling that's migrated 1:1 from the old behavior, so there's extra reporting now and we should invest some time to track these down.Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)