@@ -377,8 +390,8 @@ export default function SystemsTable() {
- {table.getAllColumns().map((column) => {
- if (column.id === t`Actions` || !column.getCanSort()) return null
+ {columns.map((column) => {
+ if (!column.getCanSort()) return null
let Icon =
// if current sort column, show sort direction
if (sorting[0]?.id === column.id) {
@@ -397,7 +410,8 @@ export default function SystemsTable() {
key={column.id}
>
{Icon}
- {column.id}
+ {/* @ts-ignore */}
+ {column.columnDef.name()}
)
})}
@@ -411,8 +425,7 @@ export default function SystemsTable() {
- {table
- .getAllColumns()
+ {columns
.filter((column) => column.getCanHide())
.map((column) => {
return (
@@ -422,7 +435,8 @@ export default function SystemsTable() {
checked={column.getIsVisible()}
onCheckedChange={(value) => column.toggleVisibility(!!value)}
>
- {column.id}
+ {/* @ts-ignore */}
+ {column.columnDef.name()}
)
})}
@@ -434,128 +448,24 @@ export default function SystemsTable() {
+ )
+ }, [visibleColumns.length, sorting, viewMode, locale])
+
+ return (
+