syncfusion/ej2-react-ui-components

React-hook-form focusing aren't working with SyncFusion React

atillaaliyev opened this issue · 1 comments

Hi,

I'm using react-hook-form for validation processes.
First , I have used a lot of UI Component such as Material UI , Antd, Prime React etc. I had no problem about this.

I'm using useForm from react-hook-form. It returns a control property for injected to Controller component. There isn't any problem. Validation is working perfect. But I have a problem: focusing.

At normal flowing, It is given me ref property by render prop of Controller. When I gave this property to input item, react-hook-form will arrange focus process automatic.When I got any validation error, cursor will focus first error item. It's working plain input but not working TextBoxComponent. I injected this ref to TextBoxComponent but probably TextBoxComponent prevent it. I reviewed TextBoxComponent's source code, but i didn't find solution. I'm sharing Codesandbox link.

Do you have any idea about this?
https://codesandbox.io/s/react-hook-form-with-syncfusion-lb67ft?file=/src/App.tsx:2544-2560