How do I handle onFocus and onBlur event for multiple input elements using react-hook-form in a component #9197
Unanswered
dindustack
asked this question in
General
Replies: 1 comment
-
not clear with your question and code snipt is hard to read. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is the child element
import { Input, Text, View, VStack } from 'native-base'
import { Control, Controller } from 'react-hook-form'
import React from 'react'
export interface PropertyInputProps {
defaultValue: string
name: string
control: Control
isFocused?: () => void
onBlur?: () => void
}
export function PropertyInput({
control,
name,
defaultValue,
isFocused,
onBlur
}: PropertyInputProps) {
return (
<Controller
control={control}
name={name}
defaultValue={defaultValue}
render={({ field: { value, ref, onChange } }) => (
)}
/>
)
}
Beta Was this translation helpful? Give feedback.
All reactions