mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 09:49:28 +08:00
feat: allow searching by status in systems table
This commit is contained in:
@@ -142,6 +142,12 @@ export default function SystemsTable() {
|
|||||||
minSize: 0,
|
minSize: 0,
|
||||||
accessorKey: "name",
|
accessorKey: "name",
|
||||||
id: t`System`,
|
id: t`System`,
|
||||||
|
filterFn: (row, _, filterVal) => {
|
||||||
|
// allow filtering by name or status via input field
|
||||||
|
const { name, status } = row.original
|
||||||
|
filterVal = filterVal.toLowerCase()
|
||||||
|
return name.toLowerCase().includes(filterVal) || t`${status}`.toLowerCase().includes(filterVal)
|
||||||
|
},
|
||||||
enableHiding: false,
|
enableHiding: false,
|
||||||
icon: ServerIcon,
|
icon: ServerIcon,
|
||||||
cell: (info) => (
|
cell: (info) => (
|
||||||
|
Reference in New Issue
Block a user