setGlobalFilter(e.target.value)}
placeholder="חיפוש לפי מס׳ ערר או כותרת…"
className="max-w-sm bg-surface"
dir="rtl"
/>
{table.getFilteredRowModel().rows.length} תיקים בארכיון
{table.getHeaderGroups().map((hg) => (
{hg.headers.map((header) => (
{flexRender(
header.column.columnDef.header,
header.getContext(),
)}
{{ asc: " ▲", desc: " ▼" }[
header.column.getIsSorted() as string
] ?? ""}
))}
))}
{isPending ? (
Array.from({ length: 3 }).map((_, i) => (
{columns.map((_c, j) => (
))}
))
) : error ? (
שגיאה בטעינת ארכיון: {error.message}
) : table.getRowModel().rows.length === 0 ? (
❦
{globalFilter
? "אין תיקים תואמים לחיפוש"
: "אין תיקים בארכיון"}
) : (
table.getRowModel().rows.map((row) => (
{row.getVisibleCells().map((cell) => (
{flexRender(
cell.column.columnDef.cell,
cell.getContext(),
)}
))}
))
)}