-
Notifications
You must be signed in to change notification settings - Fork 601
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
fix: boolean attributes not overriding default property values in fast-element #4566
Comments
This behavior is a byproduct of some DOM changes being routed through
@EisenbergEffect scheduling DOM updates in |
Hmm. I think this is the correct fix, but I'm not 100% confident. I think we may need to spend some time reviewing this part of the system. I wonder if the internals of the AttributeDefinition should handle dom reflection different or if the Binding should queue but only in particular cases, or if this is an issue that's present only during initial bind, etc. @nicholasrice Do you have any time next week where you could explore a bit more just to make double sure this is the path we want to go? |
Yea I'll poke around more. This seems to be be primarily an issue during initial binding and construction, but I suppose it could manifest anytime the property value is set simultaneously as the template compiler sets the attribute, where both values are different. |
I don't know if this has already been explored, but omitting the boolean expression - the ? - from the template runs as expected. This makes me think that if an attribute type has already been defined, is there a need to explicitly add the boolean - the ?- expression in the template again. And if a user does add it, perhaps we can just leave it to the template engine to process it naturally. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@nicholasrice @EisenbergEffect Do we know if this is still a valid issue? |
🐛 Bug Report
Min Repro: https://stackblitz.com/edit/typescript-bxsxvb?file=index.ts
💻 Repro or Code Sample
mode="boolean"
, with the default value assignedtrue
false
value.🤔 Expected Behavior
The attribute should not exist on the element and the underlying property value should be
false
.😯 Current Behavior
The attribute exists on the element and the underlying property value is
true
.The text was updated successfully, but these errors were encountered: