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

135
Views
React Select abrevia los nombres desplegables en selección múltiple

Hola, ¿es posible abreviar los nombres desplegables cuando se seleccionan como en la figura a continuación? ingrese la descripción de la imagen aquí

este es mi codigo:

 multiValue: [ { value: "BUF", label: "BUF" }, { value: "CCT", label: "CCT" }, { value: "JHB", label: "JHB" }, { value: "EKH", label: "EKH" }, { value: "ETK", label: "ETK" }, { value: "MAN", label: "MAN" }, { value: "NMB", label: "NMB" }, { value: "TSH", label: "TSH" } ],
 handleMultiChange(option) { this.setState({multiValue: option}); }
 <Select id='multiple' name="filters" placeholder="Filter City" value={this.state.multiValue} options={this.state.filterOptions} onChange={this.handleMultiChange} isMulti={this.state.isMulti} styles={style} />
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede lograr esto proporcionando un componente MultiValueLabel personalizado

MultiValueLabel.component.js

 export default function MultiValueLabel({ data, innerProps, selectProps }) { // ...any logic you might need // 'data' should be the full object of each selected item // so reference whatever key is necessary return ( <div {...innerProps}> {data.abbr} </div> ) }

Entonces simplemente pasas eso

 <Select components={{ MultiSelectLabel }} ... other props />
about 4 years ago · Juan Pablo Isaza Report
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!