Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(chart-table): Scrollbar causing header + footer overflow #21064

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function StickyWrap({
const colWidths = columnWidths?.slice(0, columnCount);

if (colWidths && bodyHeight) {
const bodyColgroup = (
const colgroup = (
<colgroup>
{colWidths.map((w, i) => (
// eslint-disable-next-line react/no-array-index-key
Expand All @@ -246,23 +246,6 @@ function StickyWrap({
</colgroup>
);

// header columns do not have vertical scroll bars,
// so we add scroll bar size to the last column
const headerColgroup =
sticky.hasVerticalScroll && scrollBarSize ? (
<colgroup>
{colWidths.map((x, i) => (
// eslint-disable-next-line react/no-array-index-key
<col
key={i}
width={x + (i === colWidths.length - 1 ? scrollBarSize : 0)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reesercollins just to be triple sure, do you have evidence that this isn't required any longer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been able to find any instances where this removal causes any breaking changes, however, I am not the most knowledgeable when it comes to the usage of this plugin within superset since our organization uses a custom table viz.

/>
))}
</colgroup>
) : (
bodyColgroup
);

headerTable = (
<div
key="header"
Expand All @@ -274,7 +257,7 @@ function StickyWrap({
{React.cloneElement(
table,
mergeStyleProp(table, fixedTableLayout),
headerColgroup,
colgroup,
thead,
)}
{headerTable}
Expand All @@ -292,7 +275,7 @@ function StickyWrap({
{React.cloneElement(
table,
mergeStyleProp(table, fixedTableLayout),
headerColgroup,
colgroup,
tfoot,
)}
{footerTable}
Expand Down Expand Up @@ -320,7 +303,7 @@ function StickyWrap({
{React.cloneElement(
table,
mergeStyleProp(table, fixedTableLayout),
bodyColgroup,
colgroup,
tbody,
)}
</div>
Expand Down