Skip to content

Commit

Permalink
Fix issues where type is not set and sends an invalid query.
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Jul 1, 2024
1 parent 6ae079b commit 2275b55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/angular-formio/manager/src/index/index.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class FormManagerIndexComponent implements OnInit {
public config: FormManagerConfig
) {
this.config = {...DefaultConfiguration, ...this.config};
this.gridQuery = {type: this.config.type, sort: 'title'};
this.gridQuery = {type: this.config.type || 'form', sort: 'title'};
if (this.config.tag) {
this.gridQuery.tags = this.config.tag;
}
Expand All @@ -37,7 +37,7 @@ export class FormManagerIndexComponent implements OnInit {
}

ngOnInit() {
this.gridQuery = {type: this.config.type, sort: 'title'};
this.gridQuery = {type: this.config.type || 'form', sort: 'title'};
if (this.config.tag) {
this.gridQuery.tags = this.config.tag;
}
Expand Down Expand Up @@ -70,7 +70,7 @@ export class FormManagerIndexComponent implements OnInit {
}

clearSearch() {
this.gridQuery = {type: this.config.type, sort: 'title'};
this.gridQuery = {type: this.config.type || 'form', sort: 'title'};
if (this.config.tag) {
this.gridQuery.tags = this.config.tag;
}
Expand Down

0 comments on commit 2275b55

Please sign in to comment.