-
Notifications
You must be signed in to change notification settings - Fork 108
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
Inconsistent empty attribute behaviour #136
Comments
What's your expected behavior? |
It seems that value-less attribute is how JS reacts to field being set to empty string, so expected behaviour would be above fragment being initially rendered as
instead of
|
Interesting because we did not give any special treatment between empty and non-empty string attributes. |
Fortunately this inconsistency is not found on boolean attributes: |
If node attribute is set by binding to empty string on construction - it is omitted from resulting DOM, however if it is set to empty string after DOM is constructed - it results in value-less attribute.
Example above will be initially rendered as
but after pressing buttons it will came to look like this:
The text was updated successfully, but these errors were encountered: