Skip to content

Commit 8bc8dab

Browse files
committed
fix issue with isDirty
1 parent bb9bd01 commit 8bc8dab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hookform/devtools",
3-
"version": "1.2.1",
3+
"version": "2.0.0-beta.2",
44
"description": "React Hook Form dev tool to help debugging forms",
55
"main": "index.js",
66
"types": "dist/index.d.ts",

src/panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default ({
114114
const type = get(value, 'ref.type', undefined);
115115
const isTouched = !!get(formState.touched, name);
116116
const isNative = (value as any).ref.type;
117-
const isDirty = get(formState.dirtyFields, name);
117+
const isDirty = !!Object.keys(formState.dirtyFields).length;
118118
const hasError = !!error;
119119
const ref = get(value, 'ref');
120120

0 commit comments

Comments
 (0)