-
Notifications
You must be signed in to change notification settings - Fork 238
Blazor EditorRequired attribute incorrectly reports RZ2012 warning when @bind-MyVariable= is used instead of MyVariable= syntax. #7395
Description
This issue has been moved from a ticket on Developer Community.
[severity:It bothers me. A fix would be nice]
In a blazor component, I want to require that a string parameter be provided, but I also want to bind to it like this:
[EditorRequired]
[Parameter]
public string GLCode { get; set; } = null!;
[Parameter]
public EventCallback GLCodeChanged { get; set; }
When I use that component, and I provide the value with a @bind-GLCode="@parentGLCode", I get an incorrect RZ2012 warning that GLCode may not have been provided.
<GLCodePickerTwoColumnComponent
@bind-GLCode="@localDistribution.GLAccount">
Warning (active) RZ2012 Component 'GLCodePickerTwoColumnComponent' expects a value for the parameter 'GLCode', but a value may not have been provided.
Original Comments
Feedback Bot on 12/8/2021, 07:18 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)