From a4b730fb4efa1c909f2b85e26a8e4aec7b31cb51 Mon Sep 17 00:00:00 2001 From: maliming Date: Sat, 12 Apr 2025 15:19:29 +0800 Subject: [PATCH] Update feature management modal to filter features based on value presence and change BoolValue to nullable --- .../Pages/FeatureManagement/FeatureManagementModal.cshtml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs index 4d20c41602..a96a0c0f88 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml.cs @@ -69,7 +69,7 @@ public class FeatureManagementModal : AbpPageModel { var features = new UpdateFeaturesDto { - Features = FeatureGroups.SelectMany(g => g.Features).Select(f => new UpdateFeatureDto + Features = FeatureGroups.SelectMany(g => g.Features).Where(x => !x.Value.IsNullOrWhiteSpace() || x.BoolValue.HasValue).Select(f => new UpdateFeatureDto { Name = f.Name, Value = f.Type == nameof(ToggleStringValueType) ? f.BoolValue.ToString() : f.Value @@ -101,7 +101,7 @@ public class FeatureManagementModal : AbpPageModel public string Value { get; set; } - public bool BoolValue { get; set; } + public bool? BoolValue { get; set; } public string Type { get; set; } }