mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
parent
4eaff63eda
commit
1092c2b383
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user