-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
As is
The combination of prop spreading and passing attributes that should have an explicit true value leads to wrong server-side rendering. The same issue is described here: #6121 but the bug reappears when using the spread props, for example, when passing {...$$restProps}. It seems like this behavior is violated here:
| if (value === true) str += ' ' + name; |
Expected to be
Render attr="" when the value passed to it is true if it's a boolean attribute. In the case of any other attribute, attr="true" should be rendered instead (as it is when using DOM rendering).
Reproduction
<script>
let disabled = true;
</script>
<button {...$$restProps} aria-disabled={disabled}>
<slot/>
</button>
Logs
No response
System Info
Doesn't matter for this bugSeverity
annoyance
f-elix and devunt
Metadata
Metadata
Assignees
Labels
No labels