This repository was archived by the owner on Aug 23, 2022. It is now read-only.
Resolve Issue 905, defaultChecked bug on Control.checkbox #908
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes defaultChecked work as expected, populating the model properly and everything. Also added some failing tests for the bug, and then made the tests pass.
Minor largely irrelevant changes, I use IDEA as my IDE, and I needed to .gitignore its files.
Also, in debugging, I found that areOwnPropsEqual and areStatePropsEqual had a different signature than assumed, which was lightly confusing, so I fixed the signature. Finally, "modelValue" was set in the return function, which I edited to make it so that I could variable-inspect it, but then decided to leave it in the end, because it followed the format of all the other return values, and I felt dirty setting it back.
Actual meat and potatoes are in "src/actions/model-actions.js" and "src/constants/control-props-map.js", which, are, like, 5 lines of change. The change action was ignoring the second parameter, and control-props-map was giving weird results, and caring about defaultChecked. Not sure why, but removing it solved all things.