Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Commit 96148ca

Browse files
committed
fix #32 issue with setValue
1 parent 98363bb commit 96148ca

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ function getValue(target: any, { isCheckbox }: { isCheckbox: boolean }) {
77
if (target && (Array.isArray(target) || (target.label && target.value))) {
88
return target;
99
}
10-
return target ? (isCheckbox ? target.checked : target.value) : target;
10+
console.log(target.value);
11+
return target
12+
? isCheckbox
13+
? target.checked
14+
: target.value
15+
? target.value
16+
: target
17+
: target;
1118
}
1219

1320
const RHFInput = ({

0 commit comments

Comments
 (0)