Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Gilde committed Dec 15, 2024
1 parent 01b448e commit 6ecd5b9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
15 changes: 8 additions & 7 deletions MudBlazor.Extensions/Components/Base/MudExPickerBase.razor.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -94,7 +95,7 @@ public partial class MudExPickerBase<T>
/// </summary>
[Parameter, SafeCategory("Common")]
public IStringLocalizer Localizer { get; set; }

/// <summary>
/// Gets or sets the value of the color picker.
/// </summary>
Expand All @@ -105,7 +106,7 @@ public T Value
set
{
var org = _value;
if(BeforeValueChanged(org, value))
if (BeforeValueChanged(org, value))
{
_value = value;
AfterValueChanged(org, value);
Expand Down Expand Up @@ -168,7 +169,7 @@ protected virtual void AfterValueChanged(T from, T to)
/// <summary>
/// Id for picker element
/// </summary>
protected string Id = $"mud-ex-picker-{Guid.NewGuid().ToFormattedId()}";
protected string Id => this.ExposeField<string>("_elementId") ?? $"mud-ex-picker-{Guid.NewGuid().ToFormattedId()}";

/// <inheritdoc />
public override Task SetParametersAsync(ParameterView parameters)
Expand Down Expand Up @@ -235,7 +236,7 @@ protected override async Task OnOpenedAsync()
await base.OnOpenedAsync();
await BindPickerWidthAsync();
}

private async Task BindPickerWidthAsync()
{
if (BindWidthToPicker && PickerVariant == PickerVariant.Inline)
Expand Down Expand Up @@ -273,7 +274,7 @@ protected override Task OnPickerClosedAsync()
RaiseChanged();
return base.OnPickerClosedAsync();
}

/// <summary>
/// Raises the <see cref="ValueChanged"/> event.
/// </summary>
Expand Down Expand Up @@ -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)
);
Expand Down
2 changes: 1 addition & 1 deletion MudBlazor.Extensions/Components/MudExUploadEdit.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion MudBlazor.Extensions/wwwroot/docs/MudBlazor.Extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@
If this is set to true, the picker will open also if the input is read only.
</summary>
</member>
<member name="F:MudBlazor.Extensions.Components.Base.MudExPickerBase`1.Id">
<member name="P:MudBlazor.Extensions.Components.Base.MudExPickerBase`1.Id">
<summary>
Id for picker element
</summary>
Expand Down
6 changes: 5 additions & 1 deletion TryMudEx/Try.Core/Try.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="6.0.32" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="MudBlazor.Extensions" Version="*" />
<PackageReference Condition="'$(Configuration)' == 'Release'" Include="MudBlazor.Extensions" Version="*-*" />
</ItemGroup>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Release'">
<ProjectReference Include="..\..\MudBlazor.Extensions\MudBlazor.Extensions.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\UserComponents\Try.UserComponents.csproj" />
</ItemGroup>
Expand Down
4 changes: 0 additions & 4 deletions TryMudEx/TryMudEx.Client/TryMudEx.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@

</ItemGroup>

<ItemGroup Condition="'$(Configuration)' != 'Release'">
<ProjectReference Include="..\..\MudBlazor.Extensions\MudBlazor.Extensions.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
Expand Down

0 comments on commit 6ecd5b9

Please sign in to comment.