Commit 5b92cf8
committed
fix(hostConfig): clear JsonRecordEditor error on unmount
When the owner prop changes (e.g. to "connection-only") the host-context
JsonRecordEditor unmounts but its error state in the parent
(hostCtxError) was never cleared. The aggregated hasError signal
stayed true and onValidityChange kept Save disabled with no visible
error in the UI for the user to fix.
Add a cleanup effect inside JsonRecordEditor that calls
onErrorChange(null) on unmount. Generalizes to any section that
becomes hidden — the parent's per-section error state mirrors only
sections that are currently rendered.
https://claude.ai/code/session_01FjxdHVhJba5KpLjXiiuuCu1 parent 4b9127e commit 5b92cf8
1 file changed
Lines changed: 13 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
472 | 485 | | |
473 | 486 | | |
474 | 487 | | |
| |||
0 commit comments