Open
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.35.1
Current Behavior
I am trying to upgrade to Stencil 4.35.1 from Stencil 4.23.0. In components that are form-associated the boolean properties now behave differently than before. They cannot be set to false anymore by using the property.
In a component like below, the checkbox cannot be set to disabled by the user of the web component anymore. This was working fine in Stencil 4.23.0.
The component:
@Component({
tag: 'test-checkbox-form-associated',
shadow: true,
formAssociated: true,
})
export class TestCheckboxFormAssociated {
@AttachInternals() internals: ElementInternals;
@Prop() disabled: boolean | undefined = undefined;
componentWillLoad() {
if ('setFormValue' in this.internals) this.internals.setFormValue('');
}
render() {
return (
<label>
<input type="checkbox" disabled={this.disabled} /> checkbox
</label>
);
}
}
When using it with
<test-checkbox-form-associated disabled="false"></test-checkbox-form-associated>
this results in this HTML
<input type="checkbox" disabled="">
Expected Behavior
It works like before.
System Info
Stencil: 4.35.1 🦄
TypeScript: 5.5.4
Rollup: 4.34.9
Parse5: 7.2.1
jQuery: 4.0.0-pre
Terser: 5.37.0
Steps to Reproduce
check out example repo and do npm run start
Code Reproduction URL
https://github.com/annam002/stencil-properties-bug
Additional Information
No response