feat: Remove discrepancy between formAssociated bool resolving and normal bool Props
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
There is a discrepancy between resolving formAssociated bool properties vs normal bool properties.
formAssociated bool properties are resolved like this:
- disabled="" // true
- disabled="true" // true
- disabled="false" // true
- // false
while normal bool properties are resolved like this:
- disabeld="" // true
- disabled="true" // true
- disabled="false" // false <=========== !!!
- // false
There should be an stencil.config option where we can force other bool properties to behave like formAssociated bool properties
Describe the Use Case
There should be a consistency on how Properties of the same type are resolved independent on whether they are formAssociated properties or not
Describe Preferred Solution
The preferred solution would be to unify the behavior consistently. Add a stencil.config option { resolveBoolAttributes: "native" | "falseEqualsFalse" } (I'm bad at naming types :D) which has the current behavior as default and for future major versions is changed to the native behavior
Describe Alternatives
- Add a stencil.config option and keep the current default behavior
- OR formAssociated bool props should be resolved like other bool props in Stencil
Related Code
I also added a bug, because the current behavior for formAssociated bool props is broken: https://github.com/stenciljs/core/issues/6905
Additional Information
No response
Source: stenciljs/core