From 0ffada6aec1eb809bcbd925fdf7631faf0128699 Mon Sep 17 00:00:00 2001 From: Tim Chamberlain Date: Mon, 12 Aug 2024 12:09:29 -0500 Subject: [PATCH] CE-1555: updates 'accordian' behavior of tables --- src/qqq/components/widgets/tables/DataTable.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qqq/components/widgets/tables/DataTable.tsx b/src/qqq/components/widgets/tables/DataTable.tsx index 1cb35c9..34772ce 100644 --- a/src/qqq/components/widgets/tables/DataTable.tsx +++ b/src/qqq/components/widgets/tables/DataTable.tsx @@ -19,15 +19,12 @@ */ import {QWidgetMetaData} from "@kingsrook/qqq-frontend-core/lib/model/metaData/QWidgetMetaData"; -import {tooltipClasses, TooltipProps} from "@mui/material"; +import {Box, tooltipClasses, TooltipProps} from "@mui/material"; import Autocomplete from "@mui/material/Autocomplete"; -import Box from "@mui/material/Box"; import Icon from "@mui/material/Icon"; import {styled} from "@mui/material/styles"; import Table from "@mui/material/Table"; -import TableBody from "@mui/material/TableBody"; import TableContainer from "@mui/material/TableContainer"; -import TableRow from "@mui/material/TableRow"; import Tooltip from "@mui/material/Tooltip"; import parse from "html-react-parser"; import colors from "qqq/assets/theme/base/colors"; @@ -166,7 +163,7 @@ function DataTable({ })} > {/* float this icon to keep it "out of the flow" - in other words, to keep it from making the row taller than it otherwise would be... */} - {row.isExpanded ? "expand_less" : "chevron_right"} + {row.isExpanded ? "expand_less" : "chevron_left"} ) : null, }, @@ -312,7 +309,7 @@ function DataTable({ { boxStyle = isFooter ? {borderTop: `0.0625rem solid ${colors.grayLines.main};`, backgroundColor: "#EEEEEE"} - : {flexGrow: 1, overflowY: "scroll", scrollbarGutter: "stable", marginBottom: "-1px"}; + : {height: fixedHeight ? `${fixedHeight}px` : "auto", flexGrow: 1, overflowY: "scroll", scrollbarGutter: "stable", marginBottom: "-1px"}; } let innerBoxStyle = {}; @@ -453,7 +450,7 @@ function DataTable({ } return ( - + {entriesPerPage && ((hidePaginationDropdown !== undefined && !hidePaginationDropdown) || canSearch) ? ( {entriesPerPage && (hidePaginationDropdown === undefined || !hidePaginationDropdown) && (