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
Add line break to js table header label

I have a table with such header :

 <th key={col.label}
     style={col.size}
     class={col.class}
     scope="col"
     height="20">

I take labels from columns(col is an item of cycle). Columns is an array with such elements

this.columns.push({
   label: this.labels.lbl_forecastYTD + ' - ' + this.labels.lbl_opportunity ,
   fieldName: 'GainSum__c', 
   type: 'number',
   size: "width: 21%;", 
   class: BASE_HEADER_CLASS,
   borderRightSize: "width:  21%;"
}); 

I really want to add a line break to labels, but '\n' doesn't seem to be worked. Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use th { white-space: pre; } and \n will work.

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!