Skip to content

[release/8.0] [Blazor] Pass the member info directly #53892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Feb 8, 2024

Backport of #53874 to release/8.0

/cc @javiercn

[Blazor] Pass the member info directly

Avoids using Expression.PropertyOrField as it can throw an exception when a type contains multiple members of the same type with different casing.

Description

When users define multiple properties or fields that only differ in casing, Blazor throws an exception when the user uses one of our inputs components as part of a form.

For example:

<EditForm ...>
  <InputText @bind-Value="field" />
</EditForm>

@code
{
  public int field;
  public int Field;
}

Fixes #52755, #53891

Customer Impact

  • We've received feedback from 3 customers.
  • There is no workaround that doesn't require customers to change their code (not possible if code is in a library).
  • Regresses previous scenarios that worked in 7.0 (even if the scenarios can be considered an edge case).

Regression?

  • Yes
  • No

7.0

Risk

  • High
  • Medium
  • Low

We've added automated tests to cover this scenario and ensure it works. We've also replaced the problematic code with a simpler version where the problematic function is not invoked.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

When servicing release/2.1

  • Make necessary changes in eng/PatchConfig.props

@github-actions github-actions bot requested a review from a team as a code owner February 8, 2024 11:50
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Feb 8, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 8.0.x milestone Feb 8, 2024
@mkArtakMSFT mkArtakMSFT added the Servicing-approved Shiproom has approved the issue label Feb 12, 2024
@wtgodbe wtgodbe merged commit aad6550 into release/8.0 Feb 12, 2024
@wtgodbe wtgodbe deleted the backport/pr-53874-to-release/8.0 branch February 12, 2024 21:20
@dotnet-policy-service dotnet-policy-service bot modified the milestones: 8.0.x, 8.0.3 Feb 12, 2024
@dotnet-policy-service dotnet-policy-service bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants