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(useController): check if disabled state was set by user #11353

Merged
merged 6 commits into from Jan 2, 2024

Conversation

Moshyfawn
Copy link
Member

The isBoolean utility may not be suitable for checking if the disabled state is set, as it is primarily used for type-guards.

@Moshyfawn Moshyfawn linked an issue Jan 2, 2024 that may be closed by this pull request
1 task
Copy link

codesandbox bot commented Jan 2, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link
Contributor

github-actions bot commented Jan 2, 2024

Size Change: -1 B (0%)

Total Size: 20.4 kB

Filename Size Change
dist/index.umd.js 10.2 kB -1 B (0%)
ℹ️ View Unchanged
Filename Size
dist/index.cjs.js 10.1 kB

compressed-size-action

@Moshyfawn Moshyfawn marked this pull request as draft January 2, 2024 15:18
@Moshyfawn Moshyfawn marked this pull request as ready for review January 2, 2024 15:46
Copy link
Member

@bluebill1049 bluebill1049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix @Moshyfawn

@bluebill1049 bluebill1049 merged commit 4f4eae5 into master Jan 2, 2024
7 checks passed
@bluebill1049 bluebill1049 deleted the fix/disabled-undefined branch January 2, 2024 21:06
rafaelcalhau pushed a commit to rafaelcalhau/react-hook-form that referenced this pull request May 5, 2024
…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
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.

issue: regression with omit prop on field
2 participants