Skip to content

Commit 64fb8e3

Browse files
Merge pull request #577 from rocket-admin/fix-filter-field-update
filters: fix field change
2 parents c13e430 + c745ff6 commit 64fb8e3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

frontend/src/app/components/dashboard/db-table-filters-dialog/db-table-filters-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ <h1 mat-dialog-title class="filters-header">
2424
</mat-autocomplete>
2525
</mat-form-field>
2626

27-
<ng-container *ngFor="let value of tableRowFieldsShown | keyvalue">
27+
<ng-container *ngFor="let value of tableRowFieldsShown | keyvalue; trackBy:trackByFn">
2828
<div *ngIf="getComparatorType(getInputType(value.key)) === 'nonComparable'; else comparableFilter" class="filter-line">
2929

3030
<div *ngIf="isWidget(value.key); else defaultTableField">

frontend/src/app/components/dashboard/db-table-filters-dialog/db-table-filters-dialog.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ export class DbTableFiltersDialogComponent implements OnInit {
119119
);
120120
}
121121

122-
trackByFn(index: number) {
123-
return index; // or item.id
122+
trackByFn(index: number, item: any) {
123+
return item.key; // or item.id
124124
}
125125

126126
isWidget(columnName: string) {

frontend/src/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"#important to keep it /api for prod": true,
3-
"baseURL": "https://app.rocketadmin.com/api",
3+
"baseURL": "/api",
44
"saasURL": "https://saas.rocketadmin.com"
55
}

0 commit comments

Comments
 (0)