You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment
Package version(s): 5.10.2
Operating System: win 11
Browser name and version: Chrome latest
Code Sandbox
Link to a minimal repro (fork this code sandbox):
Steps to reproduce
1- Doesn t support react hook form now with the {...register("fieldName")}.
Actual behavior
The text was updated successfully, but these errors were encountered:
Could you provide some more details what's actually going wrong here? We do not use react-hook-form and do not support it directly, though if there is a bug in Blueprint that we can fix to resolve this issue, we will accept contributions to do so.
Thank you for your response. To provide more details, the issue arises when integrating React Hook Form's register function with BlueprintJS components. Specifically, the onChange method from React Hook Form does not seem to work in conjunction with BlueprintJS. This results in the state managed by useForm not being updated as expected when input values change.
Here's an example of the code that's causing the issue:
In the above snippet, the expectation is that the onChange event would log the current value of the input field to the console and update the form state accordingly. However, this is not happening when using BlueprintJS's InputGroup component. It seems there might be a conflict or an oversight in how BlueprintJS handles its internal state and events, which prevents React Hook Form from capturing the changes.
I hope this clarifies the issue. If there's a workaround or a potential fix that could be implemented on Blueprint's side to support React Hook Form's functionality, it would greatly enhance the developer experience for those of us integrating these two libraries.
Environment
Package version(s): 5.10.2
Operating System: win 11
Browser name and version: Chrome latest
Code Sandbox
Link to a minimal repro (fork this code sandbox):
Steps to reproduce
1- Doesn t support react hook form now with the {...register("fieldName")}.
Actual behavior
The text was updated successfully, but these errors were encountered: