Commit bf10ec0
committed
fix: initialise reasonForChange default to empty string
The basic details form became dirty right after opening edit mode in react strict mode.
This happened because reasonForChange started as undefined, but the textarea used an empty string.
React Hook Form saw that as a change and marked the form dirty.
Set reasonForChange default to empty string so the form starts clean and no false unsaved-changes warning appears.1 parent c272739 commit bf10ec0
1 file changed
Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
0 commit comments