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

191
Views
La tabla muestra datos incorrectos después de la 11.ª columna y fila

Creo que todo está bien con el código, es como una indexación de matriz 2D como los valores de columna de fila. El error es para 110: se supone que debe asumir como fila-1 columna-10, pero en este caso asume como fila-11 columna -0, solo que este es el problema, creo. Y esto sucede solo cuando maxrows se dieron como 100 su maxrows se dieron como 10, funciona bien

 jsonTable = (dataValue, datalabel): JSX.Element[] => { const table: JSX.Element[] = []; const children: JSX.Element[] = []; const { setting } = this.state; let maxRow = setting?.maxRows; let sort = setting?.sortKey; for (let index = 0; index < datalabel.length; index++) { if (index !== (sort - 1)) { const idValue = datalabel[index] + index children.push( <th className ={ this.constant.check} style = {{ fontSize: setting?.fontSize }} onClick = {this.partial(this.sortData, datalabel[index], index)} > <span className={this.constant.headerClass}><span className={this.constant.ColumnText}>{datalabel[index]}</span> <span className={this.constant.SortIndicator}> <img className={this.constant.image} id={idValue} src={this.imageUp} alt={this.constant.altImage} /></span></span> </th> ); } else { const idValue = datalabel[index] + index children.push( <th className={this.constant.check} style={{ fontSize: setting?.fontSize }} onClick={this.partial(this.sortData, datalabel[index], index)} > <span className={this.constant.headerClass}><span className={this.constant.ColumnText}>{datalabel[index]}</span> <span className={this.constant.SortIndicator}> <img className={this.constant.image1} id={idValue} src={this.imageUp} alt={this.constant.altImage} /> </span></span> </th> ); } } table.push(<tr>{children}</tr>) for (let index = 0; index < dataValue.length; index++) { const idValue = this.constant.tr + index index < maxRow ? table.push( <tr id={idValue} key={idValue} className={this.constant.tableRow} style={{ display: this.constant.tablerow, fontSize: setting?.fontSize }}> {this.bodyElement(datalabel, dataValue, index)}</tr>) : null } return table; }
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!