From 6ae079b2035c7a73f584c9f9383b04f7c6693744 Mon Sep 17 00:00:00 2001 From: Travis Tidwell Date: Mon, 1 Jul 2024 14:06:44 -0500 Subject: [PATCH 1/2] Fixing angular index search pages. --- .../manager/src/index/index.component.html | 2 +- .../manager/src/index/index.component.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/angular-formio/manager/src/index/index.component.html b/projects/angular-formio/manager/src/index/index.component.html index 41a9efe1..2ce8fb2f 100644 --- a/projects/angular-formio/manager/src/index/index.component.html +++ b/projects/angular-formio/manager/src/index/index.component.html @@ -1,5 +1,5 @@ 0) { + const search = this.searchElement?.nativeElement?.value; + if (search && search.length > 0) { this.gridQuery.skip = 0; this.gridQuery.title__regex = '/' + search + '/i'; this.gridQuery.title__regex = '/' + search.trim() + '/i'; From 2275b553c4d891d14cede4985ba380ebb055c67e Mon Sep 17 00:00:00 2001 From: Travis Tidwell Date: Mon, 1 Jul 2024 14:12:14 -0500 Subject: [PATCH 2/2] Fix issues where type is not set and sends an invalid query. --- .../angular-formio/manager/src/index/index.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/angular-formio/manager/src/index/index.component.ts b/projects/angular-formio/manager/src/index/index.component.ts index c1ee81d4..432f0a1d 100644 --- a/projects/angular-formio/manager/src/index/index.component.ts +++ b/projects/angular-formio/manager/src/index/index.component.ts @@ -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; } @@ -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; } @@ -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; }