Skip to content

Commit c121533

Browse files
authored
fix #55 with dirty fields (#56)
1 parent b771e83 commit c121533

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
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": "2.2.0",
3+
"version": "2.2.1-beta.1",
44
"description": "React Hook Form dev tool to help debugging forms",
55
"main": "dist/index.js",
66
"umd:main": "dist/index.umd.development.js",

src/panel.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ export default ({
113113
const type = get(value, 'ref.type', undefined);
114114
const isTouched = !!get(formStateRef.current.touched, name);
115115
const isNative = (value as any).ref.type;
116-
const isDirty = !!Object.keys(formStateRef.current.dirtyFields)
117-
.length;
116+
const isDirty = !!get(formStateRef.current.dirtyFields, name);
118117
const hasError = !!error;
119118
const ref = get(value, 'ref');
120119

0 commit comments

Comments
 (0)