Commit 6ef7938
committed
Fix scroll-to-error hook null reference error
- Add null check in useScrollToErrorOnSubmit hook to prevent 'Cannot read properties of null (reading handleSubmit)' error
- Remove duplicate ScrollToErrorComponentExample component declaration
- Hook now gracefully handles cases where no form methods are available
- Adds warning message when form context is missing1 parent 693054d commit 6ef7938
1 file changed
Lines changed: 7 additions & 0 deletions
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
0 commit comments