Skip to content

Commit

Permalink
fix from Kasper, determine rowcount once, prevents sudden slow downs …
Browse files Browse the repository at this point in the history
…of table loads
  • Loading branch information
trbKnl committed Nov 7, 2023
1 parent cda5104 commit e0b6269
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export const ConsentForm = (props: Props): JSX.Element => {

function rows (data: any): PropsUITableRow[] {
const result: PropsUITableRow[] = []
for (let row = 0; row <= rowCount(data); row++) {
const nRows = rowCount(data)
for (let row = 0; row <= nRows; row++) {
const id = `${row}`
const cells = columnNames(data).map((column: string) => rowCell(data, column, row))
result.push({ __type__: 'PropsUITableRow', id, cells })
Expand Down

0 comments on commit e0b6269

Please sign in to comment.