Blazor [EditorRequired] is a good move but can we get a [EditorBindRequired] as well #61032
Closed
1 task done
Labels
area-blazor
Includes: Blazor, Razor Components
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
If I design a component to bind a property eg
<component @bind-Value="_value" />
there is nothing to enforce the bind is used
if I do
it sort of does it but you need to specify them separately
<component Value="_value" ValueChanged="@((e) => _value = e)" />
using
<component @bind-Value="_value" />
show the warning "Component 'Component' expects a value for the parameter 'ValueChanged', but a value may not have been provided."
Describe the solution you'd like
it would be great if there was an [EditorBindRequired] attribute
so adding
<component Value="_value" />
gave a warning saying the "Component 'Component' expects the value parameter to be bound",
which would help anyone using my component to know this at design time and use the proper
<component @bind-Value="_value" />
Additional context
No response
The text was updated successfully, but these errors were encountered: