bug: adjust table footer height calculations (#62734)

* baldm0mma/bug-62410/ remove function incorrectly calculating table height

* baldm0mma/bug-62410/ base extended row on basic footer height, and not header height
This commit is contained in:
Jev Forsberg 2023-02-02 07:32:32 -07:00 committed by GitHub
parent 4eaff63eda
commit 1092c2b383
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ import {
} from './utils';
const COLUMN_MIN_WIDTH = 150;
const FOOTER_ROW_HEIGHT = 36;
export const Table = memo((props: Props) => {
const {
@ -63,7 +64,7 @@ export const Table = memo((props: Props) => {
const [footerItems, setFooterItems] = useState<FooterItem[] | undefined>(footerValues);
const footerHeight = useMemo(() => {
const EXTENDED_ROW_HEIGHT = headerHeight;
const EXTENDED_ROW_HEIGHT = FOOTER_ROW_HEIGHT;
let length = 0;
if (!footerItems) {
@ -81,7 +82,7 @@ export const Table = memo((props: Props) => {
}
return EXTENDED_ROW_HEIGHT;
}, [footerItems, headerHeight]);
}, [footerItems]);
// React table data array. This data acts just like a dummy array to let react-table know how many rows exist
// The cells use the field to look up values