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

186
Views
El menú desplegable React Select Async no funciona con la tecla enter y tabulador

Estoy usando el componente Async de react-select para la edición en línea en ag-grid. Hay un evento disponible en el componente react-select que captura el valor y la acción cuando hacemos cambios. Pero presionar e ingresar no captura el evento de cambio.

A continuación se muestra el ejemplo del componente asíncrono:

 <Async className = "async-multi-select" classNamePrefix="react-select" isMulti defaultValue={[]} id={"aync-react-select"} {...this.props} placeholder={""} onFocus = {() => this.handleFocusChange(true)} onBlur = {() => this.handleFocusChange(false)} onChange = {(value,action) => this.handleChange(value,action)} onKeyDown = {(event: any) => this.onKeyDown(event)} />

A continuación se muestran los eventos:

 private handleChange(value: any[], action: ActionMeta): void { if (this.props.onChange){ this.props.onChange(value,action) } this.setState({hasSelection: value.length > 0}); } private handleFocusChange(hasFocus: boolean){ this.setState({hasFocus}); } onKeyDown = (event: any) => { if (event.key === 'Enter' || event.key === 'Tab'){ //Not sure what to do here } }

También intenté usar el evento onInputChange, pero eso da una cadena como entrada. Quiero cualquier [] como entrada y, por lo tanto, estoy usando el evento onChange. ¿Alguna idea de cómo puedo manejar este evento con la tecla enter y tabulador?

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!