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

Expose useField hook from FormControl for usage in custom input components #8357

Closed
Swiftwork opened this issue Mar 13, 2024 · 1 comment
Closed
Labels
needs triage Issues and pull requests that need triage attention

Comments

@Swiftwork
Copy link

Description

It would be great to have access to the useField hook created by FormControl to have access to the props when creating custom input components.

Problem Statement/Justification

It is cumbersome to prop drill accessibility and functionality props such as the isDisabled or isInvalid for a custom input component. Having access to the same internal hook API would help keep these standardized in reusable inputs.

Proposed Solution or API

Add useField to the export list.

Alternatives

No response

Additional Information

No response

@Swiftwork Swiftwork added the needs triage Issues and pull requests that need triage attention label Mar 13, 2024
@Swiftwork Swiftwork changed the title Expose useField hook for custom input components Expose useField hook from FormControl for usage in custom input components Mar 13, 2024
@Swiftwork
Copy link
Author

Using chakra 2.5.5 this hook is called useFormControl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issues and pull requests that need triage attention
Projects
None yet
Development

No branches or pull requests

1 participant