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

92
Views
¿Hay alguna forma de poner un salto de línea para cada dato que muestra?

Tengo esta matriz y ya puedo mostrarla en la pantalla. Me pregunto si puedo poner un salto de línea para cada uno de los datos que muestra.

 { name: "cartItems", label: "Product Name", options: { filter: true, sort: true, customBodyRender: (value, tableMeta, updateValue) => { // console.log(value, "cartItems"); return value.map( (value) => value.name + " (" + value.color + ") - " + " Qty:" + value.quantity + "," ); } } }

A partir de ahora, se muestra en una línea como esta:

Nombre del artículo (color del artículo) - Cant.: 1 Nombre del artículo (color del artículo) - Cant.: 2 Nombre del artículo (color del artículo) - Cant.: 2

Quería mostrarlo de alguna manera así:

 Item name (item color) - Qty: 1 Item name (item color) - Qty: 2 Item name (item color) - Qty: 2

es posible?

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

0

Intenta agregar \n

 return value.map( (value) => value.name + " (" + value.color + ") - " + " Qty:" + value.quantity + "," + "\n" );
about 4 years ago · Juan Pablo Isaza Report

0

Prueba esto :

 return value.map((value) => `${value.name} (${value.color}) - Qty: ${value.quantity}, `);
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!