Commit c0b8ab1
committed
fix: allow external onChange to override PhoneNumberInput's internal handler
The PhoneNumberInput component was spreading props before its internal
onChange and onKeyDown handlers, which prevented external handlers from
overriding the internal ones. This caused issues in forms where the
parent component needed to manage state updates.
By moving the props spread to the end, external onChange handlers can
now properly override the internal handler when needed, matching the
behavior of other form components like TextField.
This fixes the issue where phone number fields would immediately restore
their original values when users tried to edit them in forms that manage
their own state.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0abcba2 commit c0b8ab1
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments