Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#41897] Query disappearing from search and not visible

Andreas Pfohl141903723588
diff --git a/frontend/src/app/core/state/views/views.service.ts b/frontend/src/app/core/state/views/views.service.ts
index 2bcbebb369c..e51a65281a6 100644
--- a/frontend/src/app/core/state/views/views.service.ts
+++ b/frontend/src/app/core/state/views/views.service.ts
@@ -21,6 +21,7 @@ import { ViewsQuery } from 'core-app/core/state/views/views.query';
import { IView } from 'core-app/core/state/views/view.model';
import { ApiV3Service } from 'core-app/core/apiv3/api-v3.service';
import { ApiV3ListParameters } from 'core-app/core/apiv3/paths/apiv3-list-resource.interface';
+import { addParamToHref } from 'core-app/shared/helpers/url-helpers';
@EffectHandler
@Injectable()
@@ -49,7 +50,7 @@ export class ViewsResourceService {
return this
.http
- .get<IHALCollection<IView>>(this.viewsPath + collectionURL)
+ .get<IHALCollection<IView>>(addParamToHref(this.viewsPath + collectionURL, { pageSize: '-1' }))
.pipe(
tap((events) => {
applyTransaction(() => {
diff --git a/frontend/src/app/shared/components/op-view-select/op-view-select.component.ts b/frontend/src/app/shared/components/op-view-select/op-view-select.component.ts
index d2e144ed0b3..c1210dbb447 100644
--- a/frontend/src/app/shared/components/op-view-select/op-view-select.component.ts
+++ b/frontend/src/app/shared/components/op-view-select/op-view-select.component.ts
@@ -121,23 +121,22 @@ export class ViewSelectComponent extends UntilDestroyedMixin implements OnInit {
.onActivate(...this.menuItems)
.subscribe(() => this.initializeAutocomplete());
- this.views$ = combineLatest(
+ this.views$ = combineLatest([
this.search$,
this.viewCategories$,
- )
- .pipe(
- map(([searchText, categories]) => categories
- .map((category) => {
- if (ViewSelectComponent.matchesText(category.title, searchText)) {
- return category;
- }
-
- const filteredChildren = category.children
- ?.filter((query) => ViewSelectComponent.matchesText(query.title, searchText));
- return { title: category.title, children: filteredChildren, collapsible: true };
- })
- .filter((category) => category.children && category.children.length > 0)),
- );
+ ]).pipe(
+ map(([searchText, categories]) => categories
+ .map((category) => {
+ if (ViewSelectComponent.matchesText(category.title, searchText)) {
+ return category;
+ }
+
+ const filteredChildren = category.children
+ ?.filter((query) => ViewSelectComponent.matchesText(query.title, searchText));
+ return { title: category.title, children: filteredChildren, collapsible: true };
+ })
+ .filter((category) => category.children && category.children.length > 0)),
+ );
}
private initializeAutocomplete():void {