feat(scroll view): added in a scroll view to for quality so it dose not go over the end of the page

This commit is contained in:
2025-11-17 17:21:53 -06:00
parent 9572b71592
commit b0ac326752

View File

@@ -8,6 +8,7 @@ import {
} from "@tanstack/react-table"; } from "@tanstack/react-table";
import React, { useState } from "react"; import React, { useState } from "react";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
import { import {
Table, Table,
TableBody, TableBody,
@@ -32,6 +33,7 @@ export default function TableNoExpand({
getPaginationRowModel: getPaginationRowModel(), getPaginationRowModel: getPaginationRowModel(),
onSortingChange: setSorting, onSortingChange: setSorting,
getSortedRowModel: getSortedRowModel(), getSortedRowModel: getSortedRowModel(),
//renderSubComponent: ({ row }: { row: any }) => <ExpandedRow row={row} />, //renderSubComponent: ({ row }: { row: any }) => <ExpandedRow row={row} />,
//getRowCanExpand: () => true, //getRowCanExpand: () => true,
state: { state: {
@@ -40,7 +42,7 @@ export default function TableNoExpand({
}); });
return ( return (
<div className="p-4"> <div className="p-4">
<div className=""> <ScrollArea className="w-11/12 rounded-md border whitespace-nowrap">
<Table> <Table>
<TableHeader> <TableHeader>
{table.getHeaderGroups().map((headerGroup) => ( {table.getHeaderGroups().map((headerGroup) => (
@@ -106,7 +108,8 @@ export default function TableNoExpand({
Next Next
</Button> </Button>
</div> </div>
</div> <ScrollBar orientation="horizontal" />
</ScrollArea>
</div> </div>
); );
} }