Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 7006 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 7006 Rev 7007
Línea 5... Línea 5...
5
import SearchInput from '../../../UI/SearchInput'
5
import SearchInput from '../../../UI/SearchInput'
Línea 6... Línea 6...
6
 
6
 
7
const NavSearch = () => {
7
const NavSearch = () => {
Línea 8... Línea 8...
8
  const history = useHistory()
8
  const history = useHistory()
Línea 9... Línea 9...
9
 
9
 
10
  const { handleSubmit, register, setValue, reset } = useForm()
10
  const { handleSubmit, register, setValue, watch, reset } = useForm()
11
 
11
 
12
  const onSubmit = handleSubmit(({ keyword }) => {
12
  const onSubmit = handleSubmit(({ keyword }) => {
Línea 21... Línea 21...
21
  return (
21
  return (
22
    <SearchInput
22
    <SearchInput
23
      as="form"
23
      as="form"
24
      onSubmit={onSubmit}
24
      onSubmit={onSubmit}
25
      onChange={(e) => setValue('keyword', e.target.value)}
25
      onChange={(e) => setValue('keyword', e.target.value)}
-
 
26
      value={watch('keyword')}
26
    />
27
    />
27
  )
28
  )
28
}
29
}
Línea 29... Línea 30...
29
 
30