diff --git a/MudBlazor.Extensions/Components/Base/MudExPickerBase.razor.cs b/MudBlazor.Extensions/Components/Base/MudExPickerBase.razor.cs index 02e664c9..14213a96 100644 --- a/MudBlazor.Extensions/Components/Base/MudExPickerBase.razor.cs +++ b/MudBlazor.Extensions/Components/Base/MudExPickerBase.razor.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Components; +using System.Reflection; +using Microsoft.AspNetCore.Components; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; using Microsoft.JSInterop; @@ -94,7 +95,7 @@ public partial class MudExPickerBase /// [Parameter, SafeCategory("Common")] public IStringLocalizer Localizer { get; set; } - + /// /// Gets or sets the value of the color picker. /// @@ -105,7 +106,7 @@ public T Value set { var org = _value; - if(BeforeValueChanged(org, value)) + if (BeforeValueChanged(org, value)) { _value = value; AfterValueChanged(org, value); @@ -168,7 +169,7 @@ protected virtual void AfterValueChanged(T from, T to) /// /// Id for picker element /// - protected string Id = $"mud-ex-picker-{Guid.NewGuid().ToFormattedId()}"; + protected string Id => this.ExposeField("_elementId") ?? $"mud-ex-picker-{Guid.NewGuid().ToFormattedId()}"; /// public override Task SetParametersAsync(ParameterView parameters) @@ -235,7 +236,7 @@ protected override async Task OnOpenedAsync() await base.OnOpenedAsync(); await BindPickerWidthAsync(); } - + private async Task BindPickerWidthAsync() { if (BindWidthToPicker && PickerVariant == PickerVariant.Inline) @@ -273,7 +274,7 @@ protected override Task OnPickerClosedAsync() RaiseChanged(); return base.OnPickerClosedAsync(); } - + /// /// Raises the event. /// @@ -311,7 +312,7 @@ private string GetPickerPaperStyle() private DialogOptionsEx GetDialogOptions() { var options = (DialogOptions ?? DialogOptionsEx.DefaultDialogOptions).CloneOptions(); - options.DialogAppearance = MudExAppearance.FromStyle(b => + options.DialogAppearance = MudExAppearance.FromStyle(b => b.WithBorder(1, BorderStyle.Solid, BorderColor, BorderColor.IsSet()) .AddRaw(PickerStyle) ); diff --git a/MudBlazor.Extensions/Components/MudExUploadEdit.razor.cs b/MudBlazor.Extensions/Components/MudExUploadEdit.razor.cs index 1f8ad396..6b903ca4 100644 --- a/MudBlazor.Extensions/Components/MudExUploadEdit.razor.cs +++ b/MudBlazor.Extensions/Components/MudExUploadEdit.razor.cs @@ -1446,7 +1446,7 @@ private async void AudioRecordingCallback(SpeechRecognitionResult result) { if (result.AudioData?.Length > 0) { - string transcript = result.Transcript.Trim(); + string transcript = result.Transcript?.Trim(); var audioFile = new T { FileName = $"{(transcript ?? "audio_recording").Replace(" ", "_").Trim()}.wav", diff --git a/MudBlazor.Extensions/wwwroot/docs/MudBlazor.Extensions.xml b/MudBlazor.Extensions/wwwroot/docs/MudBlazor.Extensions.xml index 794f1bbf..50efdcc7 100644 --- a/MudBlazor.Extensions/wwwroot/docs/MudBlazor.Extensions.xml +++ b/MudBlazor.Extensions/wwwroot/docs/MudBlazor.Extensions.xml @@ -728,7 +728,7 @@ If this is set to true, the picker will open also if the input is read only. - + Id for picker element diff --git a/TryMudEx/Try.Core/Try.Core.csproj b/TryMudEx/Try.Core/Try.Core.csproj index d7ca6991..01cc3943 100644 --- a/TryMudEx/Try.Core/Try.Core.csproj +++ b/TryMudEx/Try.Core/Try.Core.csproj @@ -10,13 +10,17 @@ - + + + + + diff --git a/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj b/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj index 278567c2..bf04c1d1 100644 --- a/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj +++ b/TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj @@ -17,10 +17,6 @@ - - - -