From a6fe014c1c83e8f4c9b0560f2721e73a9d6dc1f7 Mon Sep 17 00:00:00 2001 From: wzh425 Date: Sat, 3 Aug 2024 09:46:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(SThirdPartySchemeSelect):=20?= =?UTF-8?q?The=20default=20binding=20value=20is=20not=20displayed=20(#722)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🆕 feat: SThirdPartySchemeSelect * 🐛 fix(SThirdPartySchemeSelect): The default binding value is not displayed * ⚡ refactor(SThirdPartySchemeSelect): support tooltip --- .../SThirdPartySchemeSelect.razor | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/Masa.Stack.Components/Shared/IntegrationComponents/ThirdPartyIdp/SThirdPartySchemeSelect.razor b/src/Masa.Stack.Components/Shared/IntegrationComponents/ThirdPartyIdp/SThirdPartySchemeSelect.razor index 7f953f9e..70ca437c 100644 --- a/src/Masa.Stack.Components/Shared/IntegrationComponents/ThirdPartyIdp/SThirdPartySchemeSelect.razor +++ b/src/Masa.Stack.Components/Shared/IntegrationComponents/ThirdPartyIdp/SThirdPartySchemeSelect.razor @@ -3,7 +3,7 @@ + Class="@($"{Class}")" + Tooltip="@Tooltip">
@@ -31,9 +32,6 @@ [Parameter] public EventCallback ValueChanged { get; set; } - [Parameter] - public List? ThirdPartyIdps { get; set; } - [Parameter] public bool Small { get; set; } @@ -46,18 +44,23 @@ [Parameter] public bool FillBackground { get; set; } = true; + [Parameter] + public bool IncludeLdap { get; set; } = true; + + [Parameter] + public string? Tooltip { get; set; } + + private List? _thirdPartyIdps = new(); + protected override async Task OnInitializedAsync() { - if (ThirdPartyIdps is null) - { - await InitThirdPartyIdps(); - } - else Label ??= "ThirdPartyIdp"; + Label ??= "ThirdPartyIdp"; + + await InitThirdPartyIdps(); } public async Task InitThirdPartyIdps() { - ThirdPartyIdps = new(); - ThirdPartyIdps.AddRange(await AuthClient.ThirdPartyIdpService.GetSelectAsync(default, true)); + _thirdPartyIdps = await AuthClient.ThirdPartyIdpService.GetSelectAsync(default, IncludeLdap); } }