Skip to content

fix: preserve header popup and menu controls on locale changes - #4961

Open
sridharkalaibala wants to merge 1 commit into
tabulator-tables:masterfrom
sridharkalaibala:fix/localized-header-popup
Open

sridharkalaibala wants to merge 1 commit into
tabulator-tables:masterfrom
sridharkalaibala:fix/localized-header-popup

Conversation

@sridharkalaibala

Copy link
Copy Markdown

Problem

Calling setLocale() replaces the column title HTML, removing the popup and menu buttons inserted into that title. For example, switching an English Name header to French Nom removes the control used to open a column filter popup.

Change

Emit an internal column-title-rendered event after formatting the title. The Popup and Menu modules keep their header button references in weak maps and reattach the existing nodes after title updates. This preserves button identity and click handlers, adds no DOM queries to production code, and leaves modules optional.

Fixes #4927. The issue's existing JSFiddle demonstrates the original popup behavior; header menus have the same cause.

Validation

  • New integration regressions fail on upstream for both popup and menu buttons, and pass with the fix. They verify translated titles, original button identity, no duplicates, and retained click handlers.
  • Full unit suite: 498 tests passed across 49 suites.
  • Full Rollup build passed.
  • Chromium: the new repeated-locale popup/menu interaction test and all five existing menu viewport tests passed (six tests total).
  • Changed-source ESLint and git diff --check passed.
  • Other browsers and the complete browser E2E suite were not run. Generated distribution files and local validation configuration are excluded.

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.

headerPopupIcon disappears when changing locale with table.setLocale

1 participant