Skip to content

Conversation

@johanrd
Copy link
Contributor

@johanrd johanrd commented Dec 3, 2025

Summary

Fix column widths not being restored from preferences adapter

Problem

saveColWidths (line 362) used a hardcoded 'ColumnResizing' string:

  const existing = tablePrefs.storage.forPlugin('ColumnResizing');

But the restore path in preferences.forColumn (base.ts:182) uses:

  const existing = prefs.storage.forPlugin(klass.name);

When bundlers mangle class names, ColumnResizing.name becomes something like '_ColumnResizing', causing a mismatch:

  • Save: writes to plugins.ColumnResizing.columns...
  • Restore: reads from plugins._ColumnResizing.columns...

Fix

Use ColumnResizing.name consistently for both save and restore.

  saveColWidths used hardcoded 'ColumnResizing' string while restore
  path in preferences.forColumn uses ColumnResizing.name. When bundlers
  mangle class names (e.g., to '_ColumnResizing'), widths are saved
  under a different key than they're read from.
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Dec 4, 2025
@NullVoxPopuli NullVoxPopuli merged commit ccd3680 into universal-ember:main Dec 4, 2025
13 of 14 checks passed
@github-actions github-actions bot mentioned this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants