Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid exception by possible undefined event #11139

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
d628534
fix: avoid exception by possible undefined event
rafaelcalhau Nov 4, 2023
989d0cb
Merge branch 'master' into fix/form-control-onchange-handler
rafaelcalhau Nov 8, 2023
355082b
Merge branch 'react-hook-form:master' into fix/form-control-onchange-…
rafaelcalhau Nov 11, 2023
70bf141
Merge branch 'master' into fix/form-control-onchange-handler
rafaelcalhau Nov 18, 2023
964c76e
🐞 fix #11218 `useFieldArray` focus issue with rules prop (#11221)
bluebill1049 Nov 22, 2023
626a2a6
🐞 fix #11229 issue with values not re-render the root form (#11231)
bluebill1049 Nov 25, 2023
1763831
🍢 improved `getDirtyFieldsFromDefaultValues` type (#11238)
ssi02014 Nov 28, 2023
fc76251
📮 fix(#11239): Set fields disabled state based on form and field disa…
thomasdbock Nov 29, 2023
27bb083
⌨️ change type structure of `UseFormHandleSubmit` (#11245)
mildfuzz Dec 2, 2023
fefb8ec
🔧 refactor(util function): Enhance Consistency in Utility Functions:…
Lennon57 Dec 8, 2023
79467da
fix #11267 disabled prop not affect controller validation (#11273)
bluebill1049 Dec 8, 2023
466ff32
7.49.0
bluebill1049 Dec 9, 2023
664a635
🥼 update changelog v7.49.0
bluebill1049 Dec 9, 2023
88c8168
🐞 fix #11276 issue with disabled omit on Controller (#11277)
bluebill1049 Dec 10, 2023
1f3ef46
🐞 fix #11287 disabled prop cause const dirtyFields update (#11291)
bluebill1049 Dec 12, 2023
c120a8e
🩺 add test for disabled form field submit (#11288)
jantimon Dec 12, 2023
7b10982
🩺 add broken test for useController (#11290)
jantimon Dec 12, 2023
c60158b
7.49.1
bluebill1049 Dec 12, 2023
87093f6
🐞 fix #11292 issue with controller validation prop (#11294)
bluebill1049 Dec 13, 2023
d7cf9a7
🩺 add broken test for useController (#11293)
jantimon Dec 13, 2023
bd1a036
7.49.2
bluebill1049 Dec 13, 2023
0f66ca0
🐞 fix #11328 resetField with object as defaultValue (#11329)
geeee Dec 21, 2023
808927f
🖨️ fix: Change `DeepPartial` type definition to be compatible with `u…
RulerOfCakes Dec 22, 2023
a0e0df7
🐛 fix(useController): check if disabled state was set by user (#11353)
Moshyfawn Jan 2, 2024
7fceba6
🐛 fix(reset): remove global reset option flag (#11355)
Moshyfawn Jan 3, 2024
8d9621d
🐛 fix(formState, disabled): infer controlled disabled form state (#11…
Moshyfawn Jan 4, 2024
4f1514b
7.49.3
bluebill1049 Jan 8, 2024
51703c1
🐞 fix #11374: Nested deep partial with unknown (#11373)
jonahallibone Jan 9, 2024
4398902
🐞 fix #11368 keep form state mounted when keeping values (#11384)
bluebill1049 Jan 11, 2024
be4941c
🧑‍✈️ fix #11281 issue with upgrade node version (#11392)
bluebill1049 Jan 13, 2024
6269046
⌨️ fix #10734 watch and useWatch without parameters return type (#11359)
eladattias1996 Jan 13, 2024
8e2e507
💩 fix #11322 trigger extra re-render with useWatch plus shouldUnregis…
bluebill1049 Jan 14, 2024
d450591
🐞 close #11246 skip root validation on action when mode and revalidat…
bluebill1049 Jan 14, 2024
88d4f6c
✨ feat(values): priorities values over defaultvalues (#11399)
Moshyfawn Jan 15, 2024
930f311
⌨️ fix: change `DeepPartial` to account for object union types & `unk…
RulerOfCakes Jan 15, 2024
346c64a
💫 feat(useForm): leave formState flags in a consistent state when thr…
anonkey Jan 15, 2024
0e2bbf7
🏷️ improve `CustomElement` type (#11309)
r-kataoka11 Jan 15, 2024
b365739
🐞 fixes #11386 get new dirtyFields when reset keeping defaults and di…
IanVS Jan 16, 2024
66ab562
👷 build(Engines): remove pnpm dependency (#11425)
Moshyfawn Jan 22, 2024
691b599
🔧 fix data param in handleSubmit when TTransformedValues is a union t…
Ar4ys Jan 22, 2024
4ed1d6e
7.50.0
bluebill1049 Feb 1, 2024
26d56d8
✅ chore: add noop Utils Function (#11455)
ssi02014 Feb 2, 2024
facd4f9
Revert "⌨️ fix #10734 watch and useWatch without parameters return ty…
bluebill1049 Feb 6, 2024
fa0a171
7.50.1
bluebill1049 Feb 6, 2024
9b7a830
🐞 close #11503 issue dirty field update with async validation (#11509)
bluebill1049 Feb 14, 2024
6acc8ba
🧽 chore: removed unused utils and resp. test cases (#11476)
deepgolani4 Feb 14, 2024
1829f10
❤️ thank you principal.com for your contribution
bluebill1049 Feb 16, 2024
c978296
Revert "🔧 fix data param in handleSubmit when TTransformedValues is a…
bluebill1049 Feb 16, 2024
f33fe7a
🤡 fix flush root render hack (#11521)
bluebill1049 Feb 17, 2024
5e7afa2
Revert "✨ feat(values): priorities values over defaultvalues (#11399)…
bluebill1049 Feb 24, 2024
54f7560
😾 fix #11514 issue under strict mode reset invoke twice reset mounted…
bluebill1049 Feb 24, 2024
08d73e7
💬 add `isValidating` and `validatingFields` to field state (#10657)
pbankonier Feb 24, 2024
4750a08
💅 related #11541 improve dirty check when `undefined` provided with `…
bluebill1049 Feb 24, 2024
aa60025
🧗‍♂️ chore: update lib dev deps (#11548)
bluebill1049 Feb 25, 2024
df0790c
⌨️ chore: replace ts-ignore with ts-expect-error (#11573)
deepgolani4 Mar 1, 2024
f97873c
7.51.0
bluebill1049 Mar 1, 2024
07d19ec
🥼 update changelog v7.51.0
bluebill1049 Mar 1, 2024
68c44da
🐞 fix #11590 issue with trigger on validatingFields (#11613)
bluebill1049 Mar 10, 2024
e96a6c9
💚 ci: cleanup actions versions (#11629)
Moshyfawn Mar 13, 2024
a2f08c7
🐛 bug(validatingFields, trigger): handle all fields validation trigge…
Moshyfawn Mar 15, 2024
c64b9d0
7.51.1
bluebill1049 Mar 17, 2024
b088eae
fix #11719 validation stuck on true state (#11723)
bluebill1049 Mar 26, 2024
4d241bc
7.51.2
bluebill1049 Mar 26, 2024
6552332
🐞 fix #11773 regression on dirty check with reset (#11775)
bluebill1049 Apr 11, 2024
ce24d15
7.51.3
bluebill1049 Apr 11, 2024
e706532
🩻 update README.md (#11776)
bluebill1049 Apr 12, 2024
7e0e987
👹 close #11778 improve unregister omit key with getValues method (#11…
bluebill1049 Apr 14, 2024
912b47b
7.51.4
bluebill1049 May 4, 2024
85c9982
📖 fix broken link to examples in README.md (#11805)
mjr2595 May 4, 2024
f948cf5
⌨️ close: correct type of `error` field in `getFieldState` return obj…
cj-young May 5, 2024
f5db6f7
fix: avoid exception by possible undefined event
rafaelcalhau Nov 4, 2023
ba5ce47
Merge branch 'master' into fix/form-control-onchange-handler
rafaelcalhau May 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/logic/createFormControl.ts
Expand Up @@ -680,7 +680,11 @@ export function createFormControl<
};

const onChange: ChangeHandler = async (event) => {
if (!event) {
return;
}
_state.mount = true;

const target = event.target;
let name = target.name as string;
let isFieldValueUpdated = true;
Expand Down