diff --git a/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.html b/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.html index 9a44a54f4..361269f2d 100644 --- a/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.html +++ b/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.html @@ -25,10 +25,15 @@
-
+
+ + +
@@ -42,6 +47,7 @@

+ diff --git a/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.ts b/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.ts index 179b386f6..d032f448c 100644 --- a/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.ts +++ b/src/components/apis/list-of-apis/ko/runtime/api-list-tiles.ts @@ -24,6 +24,7 @@ export class ApiListTiles { public readonly pattern: ko.Observable; public readonly tags: ko.Observable; public readonly groupByTag: ko.Observable; + public readonly groupTagsExpanded: ko.Observable>; public readonly pageNumber: ko.Observable; public readonly totalPages: ko.Observable; @@ -43,6 +44,7 @@ export class ApiListTiles { this.apiGroups = ko.observableArray(); this.groupByTag = ko.observable(false); this.defaultGroupByTagToEnabled = ko.observable(false); + this.groupTagsExpanded = ko.observable(new Set()); } @Param() @@ -125,6 +127,12 @@ export class ApiListTiles { this.loadPageOfApis(); } + public groupTagCollapseToggle(tag: string): void { + const newSet = this.groupTagsExpanded(); + newSet.has(tag) ? newSet.delete(tag) : newSet.add(tag); + this.groupTagsExpanded(newSet); + } + public async onTagsChange(tags: Tag[]): Promise { this.tags(tags); } diff --git a/src/components/apis/list-of-apis/ko/runtime/api-list.html b/src/components/apis/list-of-apis/ko/runtime/api-list.html index d25ba849d..9d9f392fb 100644 --- a/src/components/apis/list-of-apis/ko/runtime/api-list.html +++ b/src/components/apis/list-of-apis/ko/runtime/api-list.html @@ -39,9 +39,14 @@