Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 12, 2025

Problem

The Blazor input component snippets were generating incorrect @bind-value syntax (with lowercase 'v'), which causes errors in Blazor applications. Blazor expects @bind-Value with a capital 'V' for form input components.

Solution

Updated the following snippets in snippets/components.json to use the correct @bind-Value syntax:

  • bitext - InputText component
  • bitextarea - InputTextArea component
  • binumber - InputNumber component
  • bicheck - InputCheckbox component
  • bidate - InputDate component

The biselect (InputSelect) snippet already had the correct syntax and was not modified.

Example

Before:

<InputText id="firstName" @bind-value="model.FirstName" />

After:

<InputText id="firstName" @bind-Value="model.FirstName" />

This ensures all generated Blazor input component snippets use the correct binding syntax that matches the framework's expectations.

Also bumped the package version from 1.5.1 to 1.5.2 as per CONTRIBUTING.md guidelines.

Fixes the issue reported in #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Wrong Snippet Code</issue_title>
<issue_description>Hi, in your Razor Component Snipptes will be generated "@bind-value= ...", this fails because "@bind-Value= ..." is expected.
Greets</issue_description>

Comments on the Issue (you are @copilot in this section)

@scottsauber Wanna send a PR? Code is in here: https://github.com/scottsauber/BlazorSnippets/blob/main/snippets/components.json

Fixes #5


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@scottsauber scottsauber marked this pull request as ready for review October 12, 2025 00:50
@scottsauber
Copy link
Owner

@copilot looks good - do it

Co-authored-by: scottsauber <10823939+scottsauber@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix incorrect @bind-value code in Razor Component snippets Fix @bind-value to @bind-Value in Razor Component snippets Oct 12, 2025
Copilot AI requested a review from scottsauber October 12, 2025 00:56
Copilot finished work on behalf of scottsauber October 12, 2025 00:56
Copilot finished work on behalf of scottsauber October 12, 2025 00:58
@scottsauber scottsauber merged commit 65f1dbd into main Oct 12, 2025
1 check passed
@scottsauber scottsauber deleted the copilot/fix-snippet-code-issue branch October 12, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong Snippet Code

2 participants