Skip to content

Commit 01d9827

Browse files
authored
fix #89 (panel): Display 'touched' and 'dirty' correctly on nested fields (#89)
1 parent 185d441 commit 01d9827

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/panel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ function PanelChildren<T, K, L, M, G>({
6565
const errorMessage = get(error, 'message', undefined);
6666
const errorType = get(error, 'type', undefined);
6767
const type = get(value, 'ref.type', undefined);
68-
const isTouched = !!get(touchedFields, name);
68+
const isTouched = !!get(touchedFields, value._f.name);
6969
const isNative = !!(value && value._f.ref.type);
70-
const isDirty = !!get(dirtyFields, name);
70+
const isDirty = !!get(dirtyFields, value._f.name);
7171
const hasError = !!error;
7272
const ref = get(value, '_f.ref');
7373

0 commit comments

Comments
 (0)