Browse Source

fix: #5638

pull/5654/head
Ahmet 6 years ago
parent
commit
93033fd49b
  1. 2
      modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor
  2. 7
      modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs

2
modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor

@ -16,7 +16,7 @@
} }
else else
{ {
<Tabs TabPosition="TabPosition.Left" Pills="true" SelectedTab="@GetNormalizedGroupName(Groups.First().Name)"> <Tabs TabPosition="TabPosition.Left" Pills="true" @bind-SelectedTab="@SelectedTabName">
<Items> <Items>
@foreach (var group in Groups) @foreach (var group in Groups)
{ {

7
modules/feature-management/src/Volo.Abp.FeatureManagement.Blazor/Components/FeatureManagementModal.razor.cs

@ -2,6 +2,7 @@
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Blazorise; using Blazorise;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
@ -29,6 +30,8 @@ namespace Volo.Abp.FeatureManagement.Blazor.Components
protected string ProviderName; protected string ProviderName;
protected string ProviderKey; protected string ProviderKey;
protected string SelectedTabName;
protected List<FeatureGroupDto> Groups { get; set; } protected List<FeatureGroupDto> Groups { get; set; }
@ -36,7 +39,7 @@ namespace Volo.Abp.FeatureManagement.Blazor.Components
protected Dictionary<string, string> SelectionStringValues; protected Dictionary<string, string> SelectionStringValues;
public virtual async Task OpenAsync(string providerName, string providerKey) public virtual async Task OpenAsync([NotNull]string providerName, string providerKey = null)
{ {
ProviderName = providerName; ProviderName = providerName;
ProviderKey = providerKey; ProviderKey = providerKey;
@ -46,6 +49,8 @@ namespace Volo.Abp.FeatureManagement.Blazor.Components
Groups = (await FeatureAppService.GetAsync(ProviderName, ProviderKey)).Groups; Groups = (await FeatureAppService.GetAsync(ProviderName, ProviderKey)).Groups;
SelectedTabName = GetNormalizedGroupName(Groups.First().Name);
foreach (var featureGroupDto in Groups) foreach (var featureGroupDto in Groups)
{ {
foreach (var featureDto in featureGroupDto.Features) foreach (var featureDto in featureGroupDto.Features)

Loading…
Cancel
Save