mirror of
https://github.com/apache/superset.git
synced 2026-04-21 00:54:44 +00:00
feat(table): Table with Time Comparison (#28057)
Co-authored-by: Lily Kuang <lily@preset.io> Co-authored-by: lilykuang <jialikuang@gmail.com> Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
This commit is contained in:
@@ -183,7 +183,9 @@ function StickyWrap({
|
||||
}
|
||||
const fullTableHeight = (bodyThead.parentNode as HTMLTableElement)
|
||||
.clientHeight;
|
||||
const ths = bodyThead.childNodes[0]
|
||||
// instead of always using the first tr, we use the last one to support
|
||||
// multi-level headers assuming the last one is the more detailed one
|
||||
const ths = bodyThead.childNodes?.[bodyThead.childNodes?.length - 1 || 0]
|
||||
.childNodes as NodeListOf<HTMLTableHeaderCellElement>;
|
||||
const widths = Array.from(ths).map(
|
||||
th => th.getBoundingClientRect()?.width || th.clientWidth,
|
||||
|
||||
Reference in New Issue
Block a user