Commit 6c7983a
fix: clear DateInput when controlled value prop becomes undefined
When a controlled DateInput had its value prop change from a date string
to undefined, the input visually retained the old date. This adds reset
logic in componentDidUpdate to clear both internal state and the DOM
element when the value transitions from truthy to falsy.
OWNER-221
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 1ea3fdc commit 6c7983a
2 files changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
251 | 258 | | |
252 | 259 | | |
253 | 260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
560 | 560 | | |
561 | 561 | | |
562 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
563 | 585 | | |
564 | 586 | | |
565 | 587 | | |
| |||
0 commit comments