-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTable: resizableColumns with stateStorage will not adjust saved column width after refresh. #4211
Comments
the code here set the primereact/components/lib/datatable/DataTable.js Line 1314 in 16bd9d7
but recover the column width using
|
@netcan do you have a proposed fix? |
melloware
added a commit
to melloware/primereact
that referenced
this issue
May 17, 2023
Submitted a PR. it should not have been using a State variable but a ref as |
melloware
added a commit
to melloware/primereact
that referenced
this issue
May 17, 2023
melloware
added a commit
to melloware/primereact
that referenced
this issue
May 17, 2023
melloware
added a commit
that referenced
this issue
May 17, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I use
stateStorage
to save DataTable state, which includes column width/column order etc. if I refresh the page, the column width is reset, it should keep the width before the refresh.Reproducer
https://codesandbox.io/embed/primereact-demo-forked-khph5t?fontsize=14&hidenavigation=1&theme=dark
PrimeReact version
9.2.2
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
Chrome 111.0.5563.146
Steps to reproduce the behavior
Goto reproducer, adjust the column width and refresh the page.
Expected behavior
after refreshing the page, the column width remains as before.
The text was updated successfully, but these errors were encountered: