Commit 195e307
committed
Avoid validation warning when inputs change type
For controlled inputs, `updateWrapper` was getting called before the
`type` prop had a chance to update. This could lead to a case where
switching from the `text` to `number` type caused a validation error
that would prevent the proper input value from being assigned.
This commit moves the call to `ReactDOMInput.updateWrapper` below
`_updateProperties` to avoid this situation.1 parent 3fd5826 commit 195e307
File tree
2 files changed
+36
-6
lines changed- src/renderers/dom
- client/wrappers/__tests__
2 files changed
+36
-6
lines changedLines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
772 | 793 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
910 | | - | |
911 | 910 | | |
912 | 911 | | |
913 | 912 | | |
| |||
920 | 919 | | |
921 | 920 | | |
922 | 921 | | |
923 | | - | |
924 | 922 | | |
925 | 923 | | |
926 | 924 | | |
| |||
935 | 933 | | |
936 | 934 | | |
937 | 935 | | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
942 | 951 | | |
943 | 952 | | |
944 | 953 | | |
| |||
0 commit comments