diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx index 6c5123806f94d..956b066c9acc7 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + import React, { useCallback, useRef, diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx index 067d071ee1926..4c3372879d451 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/hooks/useSticky.tsx @@ -110,6 +110,7 @@ const fixedTableLayout: CSSProperties = { tableLayout: 'fixed' }; /** * An HOC for generating sticky header and fixed-height scrollable area */ + function StickyWrap({ sticky = {}, width: maxWidth, @@ -215,7 +216,8 @@ function StickyWrap({ let sizerTable: ReactElement | undefined; let headerTable: ReactElement | undefined; let footerTable: ReactElement | undefined; - let bodyTable: ReactElement | undefined; + let fullTable: ReactElement | undefined; + if (needSizer) { const theadWithRef = React.cloneElement(thead, { ref: theadRef }); const tfootWithRef = tfoot && React.cloneElement(tfoot, { ref: tfootRef }); @@ -253,6 +255,7 @@ function StickyWrap({ style={{ overflow: 'hidden', }} + aria-hidden="true" > {React.cloneElement( table, @@ -290,20 +293,18 @@ function StickyWrap({ scrollFooterRef.current.scrollLeft = e.currentTarget.scrollLeft; } }; - bodyTable = ( + + fullTable = (