Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<PackageReference Include="BootstrapBlazor.PdfViewer" Version="9.0.6" />
<PackageReference Include="BootstrapBlazor.Player" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.RDKit" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Region" Version="9.0.5" />
<PackageReference Include="BootstrapBlazor.Region" Version="9.0.6" />
<PackageReference Include="BootstrapBlazor.SignaturePad" Version="9.0.1" />
<PackageReference Include="BootstrapBlazor.SmilesDrawer" Version="9.0.2" />
<PackageReference Include="BootstrapBlazor.Sortable" Version="9.0.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<div class="col-12 col-sm-6">
<BootstrapInputGroup>
<BootstrapInputGroupLabel DisplayText="IsMultiple"></BootstrapInputGroupLabel>
<Switch @bind-Value="@_isMultiple"></Switch>
<Switch Value="@_isMultiple" OnValueChanged="OnValueChagned"></Switch>
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in handler reference: update to OnValueChanged to match the corrected method name.

Suggested change
<Switch Value="@_isMultiple" OnValueChanged="OnValueChagned"></Switch>
<Switch Value="@_isMultiple" OnValueChanged="OnValueChanged"></Switch>

Copilot uses AI. Check for mistakes.
</BootstrapInputGroup>
</div>
<div class="col-12 col-sm-6">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ public partial class SelectCities
private bool _isDisabled = false;

private bool _autoClose = true;

private Task OnValueChagned(bool v)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (typo): Typo in method name: 'OnValueChagned' should be 'OnValueChanged'.

Please rename the method to 'OnValueChanged' for clarity and consistency.

Suggested implementation:

    private Task OnValueChanged(bool v)
    {
        _value = "";
        _isMultiple = v;
        StateHasChanged();
        return Task.CompletedTask;
    }
}

If this method is referenced elsewhere in the file or project (e.g., in the .razor markup or other C# code), those references should also be updated to use OnValueChanged instead of OnValueChagned.

Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in method name: rename OnValueChagned to OnValueChanged and update call sites accordingly.

Suggested change
private Task OnValueChagned(bool v)
private Task OnValueChanged(bool v)

Copilot uses AI. Check for mistakes.
{
_value = "";
_isMultiple = v;
StateHasChanged();
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling StateHasChanged inside an event callback is generally unnecessary because Blazor re-renders after handling the event; consider removing this call.

Suggested change
StateHasChanged();

Copilot uses AI. Check for mistakes.
return Task.CompletedTask;
Comment on lines +23 to +28
Copy link

Copilot AI Oct 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the handler does not perform asynchronous work, prefer a void-returning signature to avoid allocating Task.CompletedTask and simplify the method; e.g., change to 'private void OnValueChanged(bool isMultiple)'.

Suggested change
private Task OnValueChagned(bool v)
{
_value = "";
_isMultiple = v;
StateHasChanged();
return Task.CompletedTask;
private void OnValueChagned(bool v)
{
_value = "";
_isMultiple = v;
StateHasChanged();

Copilot uses AI. Check for mistakes.
}
}
Loading