Table: Resizable columns in expand mode with state feature. Column sizes not properly restored #12398
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
When using the resizable columns in "expand" mode with the state feature.
The size of the columns is not correctly restored.
The total width of the table is saved in the state with the format "1234px".
When restoring the state of the columns, the method "restoreColumnWidths" restores the total width of the table by adding "px" again (it tries to restore the width with the value "1234pxpx")
Environment
PrimeNG 14.x
Table component with Resizable columns & expand mode & table state feature
Reproducer
https://stackblitz.com/edit/github-3ah8na
Angular version
14
PrimeNG version
14
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18
Browser(s)
No response
Steps to reproduce the behavior
State is saved in local storage under https://github-3ah8na.stackblitz.io > statedemo-local
Remove "px" from tableWidth
Expected behavior
Column sizes should be restored when using expand mode with state feature
The text was updated successfully, but these errors were encountered: