[PR #2291] [MERGED] DataBoundFormComponent: Generate FieldIdentifier if ValueChanged given #3176

Open
opened 2026-01-29 18:22:15 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/2291
Author: @joriverm
Created: 9/18/2025
Status: Merged
Merged: 9/22/2025
Merged by: @enchev

Base: masterHead: feature/fieldidentifier


📝 Commits (1)

  • 8b00133 DataBoundFormComponent: Generate FieldIdentifier if ValueChanged is given

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 Radzen.Blazor/DataBoundFormComponent.cs (+5 -3)

📄 Description

i took a page out of FluentUI's book and noticed that they also make the field identifier if only ValueChanged is given

https://github.com/microsoft/fluentui-blazor/blob/dev/src/Core/Components/Base/FluentInputBase.cs#L315-L322

this allows validations to work if the user makes a one way binding (Value=@someProperty) and fills in ValueChanged(ValueChanged=@(value => SomeProperty=value)). we have come across the need to fill in the expression a few times in our application, so i have made a PR to help us (and anyone else) make validations work faster :)

this was tested in the RequiredValidatorDropDown.razor by changing @bind-Value=@model.CategoryName in TValue=string Value=@model.CategoryName ValueChanged=@(value => model.CategoryName=value) and worked nicely as both validations triggered.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/2291 **Author:** [@joriverm](https://github.com/joriverm) **Created:** 9/18/2025 **Status:** ✅ Merged **Merged:** 9/22/2025 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `feature/fieldidentifier` --- ### 📝 Commits (1) - [`8b00133`](https://github.com/radzenhq/radzen-blazor/commit/8b0013336fa337f5c24fe86a45cdd891e5eb505f) DataBoundFormComponent: Generate FieldIdentifier if ValueChanged is given ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/DataBoundFormComponent.cs` (+5 -3) </details> ### 📄 Description i took a page out of FluentUI's book and noticed that they also make the field identifier if only ValueChanged is given https://github.com/microsoft/fluentui-blazor/blob/dev/src/Core/Components/Base/FluentInputBase.cs#L315-L322 this allows validations to work if the user makes a one way binding (`Value=@someProperty`) and fills in ValueChanged(`ValueChanged=@(value => SomeProperty=value)`). we have come across the need to fill in the expression a few times in our application, so i have made a PR to help us (and anyone else) make validations work faster :) this was tested in the `RequiredValidatorDropDown.razor` by changing `@bind-Value=@model.CategoryName` in `TValue=string Value=@model.CategoryName ValueChanged=@(value => model.CategoryName=value)` and worked nicely as both validations triggered. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:22:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3176