Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
autocompletar de material-ui siempre devuelve 0 al cambiar

cuando trato de cambiar el valor en autocompletar de material-ui, siempre obtengo su valor 0, aquí he subido todo mi código, ¿alguien puede verificar mi código y ayudarme a resolver este problema? Cualquier ayuda será muy apreciada.

 type Props = { team?: Team; onSubmit: (params: TeamParams) => Promise<unknown>; onDelete?: () => void; }; type State = { userId: string; }; export const TeamForm: FC<Props> = ({ team, onSubmit, onDelete }) => { const { users } = useDataContext(); const [state, setState] = useState<State>({ userId: tearm?.userId.toString() || '', }); : : const userValue = users.find(user => user.id == Number(state.userId)) return ( <Autocomplete options={users.map( c => `${c.id}: ${c.name}`, )} value={state.userId} inputValue={ userValue?.id + userValue?.name } onChange={event => setState({ ...state, userId: (event.target as HTMLInputElement).value, }) } renderInput={params => ( <TextField {...params} fullWidth label='ユーザー' /> )} /> ); };

Además, si agrega lo siguiente, no puede modificar el cuadro de texto. ¿Alguien puede verificar mi código y ayudarme a resolver este problema? Cualquier ayuda será muy apreciada.

 inputValue={`${userValue?.id}: ${userValue?.organizationName} ${userValue?.name}`}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!