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

Conversation

rafaelcalhau
Copy link

When a user fills out a validated form and hits ENTER in the keyboard, the lib throws an exception by undefined event in onChange handler. This PR just verifies if the event exists.

image

Copy link

codesandbox bot commented Nov 4, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

stale bot commented Mar 13, 2024

Thank you for your contributions! This Pull Request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Best, RHF Team ❤️

@stale stale bot added the stale label Mar 13, 2024
bluebill1049 and others added 23 commits May 5, 2024 09:19
…op (react-hook-form#11221)

* 🐞 fix react-hook-form#11218 useFieldArray focus issue with rules prop

* fix issue with not focus
… and field disabled (react-hook-form#11241)

* fix(react-hook-form#11239): Set fields disabled state based on form and field disabled prop

* fix(react-hook-form#11239): If-check and unit test

* Update createFormControl.ts

---------

Co-authored-by: Thomas De Bock <thomas.de.bock@persgroep.net>
Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
)

* Change signature of UseFormHandleSubmit

* add api-extractor report
…Standardizing Export, Function Types, and Naming (react-hook-form#11268)

* refactor: Matching get and set util conventions

- obj => object
- set util change arrow function

* refactor: change sleep util

- change arrow function
- change export to export default
- The import of the file that uses the function has been modified.

* refactor: change deepMerge util

- change export to export default
- The import of the file that uses the function has been modified.

* refactor: api-extractor.md

- The changed get function argument is reflected in the report

* refactor: change arrow function

* Revert "refactor: api-extractor.md"

This reverts commit e5ff061.

* fix: api-extractor.md build

* Revert "fix: api-extractor.md build"

This reverts commit d64ec64.

* fix: check api-extractor build error
…ate (react-hook-form#11291)

* 🐞 fix react-hook-form#11287 disabled prop cause const dirtyFields update

* fix issue with test
* add test for disabled form field submit

* fix lint

---------

Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
…nknown` (react-hook-form#11333)

* fix: DeepPartial type definition

* fix: api-extractor build
…hook-form#11353)

* 🐛 fix(useController): check if disabled state was set by user

Closes: react-hook-form#11320

* ✅ test(useController): disabled state is not overriden if not set

Related: react-hook-form#11320

* 🎨 style(useController): format whitespaces

* 🐛 fix(useController): set disabled state if passed to controller

* ✅ test(useController): should respect disabled state on controller

* 🎨 style: run prettier
bluebill1049 and others added 28 commits May 5, 2024 09:19
…1476)

* Removed unused utils and resp. test cases

* remove unused functions

* added removed code

---------

Co-authored-by: deep.golani <deep.golani@bfhl.in>
* 🤡 fix flush root render hack

* fix preitter issue
…k-form#10657)

* Add isValidating to field state

* Fix type tests for isValidating field state

* Adjust bundlewatch maxSize

* Fix api-extractor.md merge fail

* Adjust formState validatingFields property

* Adjust bundlewatch maxSize

* Refactoring for isValidating fieldState

* Fix multi async validators behavior

* Remove unnecessary explicit type definition in isValidating test

* Improve _updateIsValidating method

* Add proxyFormState check to updateIsValidating method

---------

Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
…provided with `reset` api

* related react-hook-form#11541 improve dirty check when undefined provided with reset api

* early exit when no values provided
* chore: replace ts-ignore with ts-expect-error

* chore: replace ts-ignore with ts-expect-error

---------

Co-authored-by: deep.golani <deep.golani@bfhl.in>
…eact-hook-form#11613)

* 🐞 fix react-hook-form#11590 issue with trigger on validatingFields

* fix unit tests and lint error
* 💚 ci(Node): bump node action version

* 💚 ci(Issues): bump lock issue action version
react-hook-form#11624)

* WIP 🐛 bug(validatingFields, trigger): handle all fields validation trigger

* 🔧 chore: update lock file

* 🐛 bug(validatingFields, trigger): handle all fields validation trigger

* 🔧 chore: remove todo comment

* fix react-hook-form#11621 issue with undefined name as field name

* fix lint

* revert change on trigger

---------

Co-authored-by: bill <bluebill1049@hotmail.com>
Co-authored-by: Beier (Bill) <bluebill1049@hotmail.com>
…ect (react-hook-form#11831)

* fix: correct type of `error` field in `getFieldState` return object

* fix: update reports
@stale stale bot removed the stale label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet