fix: layout size

This commit is contained in:
mehedi-hasan 2024-04-14 14:21:49 +06:00
parent dbcf6cab66
commit def648dc38
3 changed files with 8 additions and 7 deletions

View File

@ -13,8 +13,6 @@ export default function WorkspaceLayout(props: {
const defaultLayout = layout?.value ? JSON.parse(layout.value) : undefined;
const defaultCollapsed = collapsed?.value ? JSON.parse(collapsed.value) : undefined;
console.log("defaultL ", defaultLayout)
console.log("defaultC ", defaultCollapsed)
return (
<>

View File

@ -29,6 +29,7 @@ import { DataTablePagination } from "./data-table-pagination";
import { DataTableToolbar } from "./data-table-toolbar";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
import { Organization } from "@/types/organization";
import { ApiCommunication } from "@/types/api-communication";
interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[];
@ -71,7 +72,7 @@ export function DataTable<TData, TValue>({
return (
<div className="space-y-4">
<DataTableToolbar table={table} data={data as Organization[]} />
<DataTableToolbar table={table} data={data as ApiCommunication[]} />
{/* <div className="rounded-md border"> */}
<ScrollArea className="rounded-md border h-[66vh]">
<Table>

View File

@ -29,7 +29,7 @@ interface DashboardProps {
}
export function Dashboard({
defaultLayout = [20, 40, 40],
defaultLayout = [15, 85],
defaultCollapsed = false,
navCollapsedSize,
children,
@ -51,8 +51,10 @@ export function Dashboard({
defaultSize={defaultLayout[0]}
collapsedSize={navCollapsedSize}
collapsible={true}
minSize={11}
maxSize={12}
// minSize={11}
// maxSize={12}
minSize={12}
maxSize={15}
onCollapse={() => {
setIsCollapsed(true);
document.cookie = `react-resizable-panels:collapsed=${JSON.stringify(
@ -75,7 +77,7 @@ export function Dashboard({
{/* <DocsSidebarNav items={docsConfig.sidebarNav} /> */}
</ResizablePanel>
<ResizableHandle withHandle className="hidden lg:flex" />
<ResizablePanel defaultSize={defaultLayout[1]} minSize={30}>
<ResizablePanel defaultSize={defaultLayout[1]} minSize={75}>
{/* <TopNav navItems={topNavItems}/> */}
{children}
</ResizablePanel>