You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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 returnnull
to ensure that no attribute is added when the value is empty.The text was updated successfully, but these errors were encountered: