Commit 6f03bce
committed
fix(user-input): always update prevDefaultValueRef on defaultValue change
Prevents stale ref when defaultValue transitions through empty — if
defaultValue goes non-empty → empty → same non-empty value, the ref
was not updated on the empty transition, causing setValue to be skipped
on the subsequent change.
Also removes unnecessary useCallback wrapping from handleSendQueuedHead,
handleEditQueued, handleEditQueuedTail in MothershipChat — none have a
reference observer (UserInput stores them via refs, QueuedMessages is
not React.memo-wrapped).1 parent e186f33 commit 6f03bce
1 file changed
Lines changed: 1 addition & 2 deletions
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | 155 | | |
157 | 156 | | |
158 | | - | |
| 157 | + | |
159 | 158 | | |
160 | 159 | | |
161 | 160 | | |
| |||
0 commit comments