fix: set checked in constructor #62
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-checkbox-example"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The checkbox example does not work properly when checked is not set in the constructor.
The
readonly checkedsyntax in TypeScript means precisely this—initialize that property to the value of the argument. What makes you think it does not work?Ah yes I was copy pasting into a plain js file, removing the typescript syntax afterwards.. I was not aware that typescript will turn that readonly constructor argument into an assignment. While this is a bit confusing for js users, it might not be a reason to change the example then.
Pull request closed