Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some bugs in Feature Management Module of Angular UI #5052

Merged
merged 1 commit into from
Aug 13, 2020
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 @@ -10,11 +10,11 @@ <h3>{{ 'AbpFeatureManagement::Features' | abpLocalization }}</h3>
*ngFor="let feature of features$ | async; let i = index"
[ngSwitch]="feature.valueType.name"
>
<div class="col-4">{{ feature.name }}</div>
<div class="col-8" *ngSwitchCase="'ToggleStringValueType'">
<div class="mr-2">{{ feature.displayName }}</div>
<div *ngSwitchCase="'ToggleStringValueType'">
<input type="checkbox" name="feature.name" [formControlName]="i" />
</div>
<div class="col-8" *ngSwitchCase="'FreeTextStringValueType'">
<div *ngSwitchCase="'FreeTextStringValueType'">
<input type="text" name="feature.name" [formControlName]="i" />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ export class FeatureManagementComponent
let features = this.store.selectSnapshot(FeatureManagementState.getFeatures);

features = features.map((feature, i) => ({
name: feature.name,
value: !this.form.value[i] || this.form.value[i] === 'false' ? null : this.form.value[i],
...feature,
value: this.form.value[i],
}));

this.store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export namespace FeatureManagement {

export interface Feature {
name: string;
displayName: string;
value: string;
description?: string;
valueType?: ValueType;
Expand Down