Skip to content

Conversation

@smably
Copy link
Contributor

@smably smably commented May 24, 2020

I noticed that fields with Boolean values didn't appear in RHF DevTools. Root cause was that the true/false value was being rendered as a JSX child, which renders nothing.

I fixed that issue by adding a check to ensure that non-object, non-string values are always converted to strings before being rendered.

I also added some test cases for different types of field values. While I was working on this, I noticed that the tsconfig.jest.json didn't have esModuleInterop enabled, which was breaking lodash imports in files under test, so I fixed that as well.

@bluebill1049
Copy link
Member

aha thanks a lot, @smably I will patch this together with V2 release next week.

@bluebill1049 bluebill1049 changed the base branch from master to V2 May 24, 2020 07:46
@bluebill1049 bluebill1049 merged commit f4828c4 into react-hook-form:V2 May 24, 2020
bluebill1049 added a commit that referenced this pull request Jun 12, 2020
* fix dirtyFields type with V6

* fix unit test

* Display Boolean field values correctly and add tests (#28)

Co-authored-by: Sylvan Mably <sylvan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants