Skip to content
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

The ElementAttributeBuilder should return null instead of empty string to prevent Blazor from generating empty attributes on final html #7817

Closed
Cyrus-Sushiant opened this issue Jun 20, 2024 · 0 comments · Fixed by #7818

Comments

@Cyrus-Sushiant
Copy link
Member

When using ElementStyleBuilder in Blazor, if a value is empty, it currently returns an empty string. This causes Blazor to add an attribute with an empty value to the element, which is not the desired behavior. Instead, it should return null to ensure that no attribute is added when the value is empty.

@msynk msynk changed the title Return null instead of empty string in ElementStyleBuilder to prevent empty attribute in Blazor The ElementAttributeBuilder should return null instead of empty string to prevent Blazor from generating empty attributes on final html Jun 20, 2024
@msynk msynk added this to the 058 - Jun 2024 - 2 milestone Jun 20, 2024
@msynk msynk moved this to In Progress in bit platform Jun 20, 2024
msynk pushed a commit that referenced this issue Jun 20, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in bit platform Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
2 participants