New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isObject should return false for Date as well as File, null, and Array #3292
Conversation
Also, update the |
78e4c10
to
2221b78
Compare
Thanks for your guidance @heath-freenome 👍 I've updated the tests and the changelog as required. |
@BenBeattieHood Also, I'm guessing that you didn't have the git precommit install hook properly installed (see the docs on how to do that). Therefore, you will need to run |
Without this, assigning dates to the form's value instead merges them with a default value for objects of `{}` (in mergeDefaultsWithFormData), which stops them being dates.
f2eef6b
to
428903a
Compare
Aah! I see that now. Thanks for the guidance & docs on this. Ok, have applied the lint formatting and rebased for a clean diff. |
rjsf-team#3292) * Tests for existing 'isObject' functionality * isObject should return false for Date as well as File, null, and Array Without this, assigning dates to the form's value instead merges them with a default value for objects of `{}` (in mergeDefaultsWithFormData), which stops them being dates. * Corrected changelog entry * Update CHANGELOG.md * Lint formatting tests Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
rjsf-team#3292) * Tests for existing 'isObject' functionality * isObject should return false for Date as well as File, null, and Array Without this, assigning dates to the form's value instead merges them with a default value for objects of `{}` (in mergeDefaultsWithFormData), which stops them being dates. * Corrected changelog entry * Update CHANGELOG.md * Lint formatting tests Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Reasons for making this change
Without this, assigning dates to the form's value instead merges them with a default value for objects of
{}
(in mergeDefaultsWithFormData), which stops them being dates.Checklist
npm run test:update
to update snapshots, if needed.