Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ <h3>
ngTabList
orientation="vertical"
selectionMode="follow"
[(selectedTab)]="selectedGroupDisplayName"
[(selectedTab)]="selectedGroupName"
class="nav nav-pills flex-column"
>
@for (group of groups(); track group.name) {
<button
ngTab
#tab="ngTab"
type="button"
[value]="group.displayName"
[value]="group.name"
class="nav-link text-start"
[class.active]="tab.selected()"
>
Expand All @@ -43,9 +43,9 @@ <h3>

<div class="col-md-8">
@for (group of groups(); track group.name) {
<div ngTabPanel [value]="group.displayName">
<div ngTabPanel [value]="group.name">
<ng-template ngTabContent>
<h4>{{ selectedGroupDisplayName() }}</h4>
<h4>{{ group.displayName }}</h4>
<hr class="mt-2 mb-3" />

@for (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class FeatureManagementComponent {
// Internal state
protected readonly _visible = signal(false);

protected readonly selectedGroupDisplayName = signal<string | undefined>(undefined);
protected readonly selectedGroupName = signal<string | undefined>(undefined);

protected readonly groups = signal<Pick<FeatureGroupDto, 'name' | 'displayName'>[]>([]);

Expand Down Expand Up @@ -147,7 +147,7 @@ export class FeatureManagementComponent {
if (!res.groups?.length) return;
const groups = res.groups.map(({ name, displayName }) => ({ name, displayName }));
this.groups.set(groups);
this.selectedGroupDisplayName.set(groups[0].displayName);
this.selectedGroupName.set(groups[0].name);
this.features.set(
res.groups.reduce(
(acc, val) => ({
Expand Down Expand Up @@ -292,7 +292,7 @@ export class FeatureManagementComponent {
}

private getCurrentGroup() {
const selectedGroup = this.selectedGroupDisplayName();
const selectedGroup = this.selectedGroupName();
return selectedGroup ? this.features()[selectedGroup] ?? [] : [];
}

Expand Down
Loading