Skip to content

Commit

Permalink
exposed scrollIntoView() to ref created via useController()
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarski committed Apr 15, 2024
1 parent 7cdad77 commit 7154408
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/useController.ts
Expand Up @@ -157,6 +157,7 @@ export function useController<
if (field && elm) {
field._f.ref = {
focus: () => elm.focus(),
scrollIntoView: (arg?: boolean | Record<string, string>) => elm.scrollIntoView(),

Check warning on line 160 in src/useController.ts

View workflow job for this annotation

GitHub Actions / build

'arg' is defined but never used

Check failure on line 160 in src/useController.ts

View workflow job for this annotation

GitHub Actions / build

Insert `⏎·············`
select: () => elm.select(),
setCustomValidity: (message: string) =>
elm.setCustomValidity(message),
Expand Down

0 comments on commit 7154408

Please sign in to comment.