Skip to content

[ZEPPELIN-6761] Fix table Export dropdown blocked by pagination - #5590

Open
miinhho wants to merge 2 commits into
apache:masterfrom
miinhho:ZEPPELIN-6761-table-export
Open

miinhho wants to merge 2 commits into
apache:masterfrom
miinhho:ZEPPELIN-6761-table-export

Conversation

@miinhho

@miinhho miinhho commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

What is this PR for?

Fixes the table result’s bottom Export button being unresponsive to hover and click.

The button was absolutely positioned over the table’s pagination area. Although the pagination controls appeared on the right, their container spanned the full table width and intercepted pointer events intended for Export.

This PR places Export and pagination in a shared, wrapping footer. They retain the existing left/right arrangement when space permits and wrap onto separate lines in narrow paragraphs, without overlapping.

The table’s built-in pagination UI is replaced with an external nz-pagination control sharing the table’s page index and page size. nz-table still handles row pagination, and the existing sorting, filtering, aggregation, and export logic remains unchanged.

What type of PR is it?

Bug Fix

What is the Jira issue?

How should this be tested?

With a Zeppelin development server and the Shell interpreter available, run the existing Chromium E2E script from zeppelin-web-angular:

npm run e2e:fast -- \
tests/notebook/paragraph/table-footer.spec.ts \
tests/notebook/paragraph/visualization-rendering.spec.ts

The new tests verify that:

  • The bottom Export menu is accessible in both full-width and narrow paragraphs, and the downloaded CSV contains exactly the rows displayed on the current page.
  • Pagination and displayed rows remain synchronized after changing the page size or applying a filter that reduces the number of pages.

The existing visualization tests check table rendering and data preservation after switching between chart modes.

For manual verification:

  1. Run a paragraph that produces a table with more than ten rows.
  2. Navigate to the next page and select Export → Export visible data as csv below the table. Verify that the downloaded CSV matches the displayed rows.
  3. Reduce the paragraph width. Verify that Export and pagination wrap without overlapping and that both controls remain usable.

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

@voidmatcha voidmatcha left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, moving the button out of the overlay fixes the overlap at its root.

One regression (this works on master): on page 2, a column filter that matches nothing leaves the previous page's rows visible above "No Data", and "Export visible data" exports them. Rerunning with fewer rows hits the same path.

Before After (clamp below)
before after

nz-table ignores an out-of-range pageIndex instead of clamping it. The built-in pagination used to reset it, but the footer pagination is now removed by @if (rows.length > 0) exactly when rows become empty. Clamping at the end of filterRows() covers render, search, sort and type change:

this.pageIndex = Math.min(this.pageIndex, Math.max(1, Math.ceil(this.rows.length / this.pageSize)));

Minor: the button's accessible name is "Export down" (from the icon), and exact is ignored for a RegExp name. aria-label="Export" lets the locator be { name: 'Export', exact: true }.

Both, with a unit spec, are in this commit for reference: voidmatcha@d4c5940a18

@voidmatcha voidmatcha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM 👍

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants