Mercurial > packages > framework
comparison publishable/resources/js/ServerTable.js @ 5:f282c6ef1671
better support for server side tables
| author | luka |
|---|---|
| date | Tue, 19 Aug 2025 22:15:16 -0400 |
| parents | 84c75d9d90be |
| children | 6ded573b0a61 |
comparison
equal
deleted
inserted
replaced
| 4:84c75d9d90be | 5:f282c6ef1671 |
|---|---|
| 172 groupVal === lastGroup && | 172 groupVal === lastGroup && |
| 173 groupRows.length > 1 | 173 groupRows.length > 1 |
| 174 ) { | 174 ) { |
| 175 return `<td></td>`; | 175 return `<td></td>`; |
| 176 } | 176 } |
| 177 return `<td>${ | 177 return `<td class='${ typeof col.class === "string" ? col.class : '' }' >${ |
| 178 typeof col.render === "function" | 178 typeof col.render === "function" |
| 179 ? col.render(row, col, i) | 179 ? col.render(row, col, i) |
| 180 : row[col.name] | 180 : row[col.name] |
| 181 }</td>`; | 181 }</td>`; |
| 182 }) | 182 }) |
| 189 .map( | 189 .map( |
| 190 (row, i) => | 190 (row, i) => |
| 191 `<tr>${cols | 191 `<tr>${cols |
| 192 .map( | 192 .map( |
| 193 (col) => | 193 (col) => |
| 194 `<td>${ | 194 `<td class='${ typeof col.class === "string" ? col.class : '' }' >${ |
| 195 typeof col.render === "function" | 195 typeof col.render === "function" |
| 196 ? col.render(row, col, i) | 196 ? col.render(row, col, i) |
| 197 : row[col.name] | 197 : row[col.name] |
| 198 }</td>`, | 198 }</td>`, |
| 199 ) | 199 ) |
