Open shyzw opened 2 years ago
Hi @shyzw The custom column width is reset because the component re-renders when the table's children are changed. In order to save the column width, you can get the column width through the column's onResize callback, save it in the state, and let the column width be controlled.
Reference example: https://table.rsuitejs.com/#custom-cell
Hi @simonguo Thank you for your reply. I will try that.
Versions
react
17.0.2
rsuite-table
5.7.1
What is the expected behavior?
The column keeps width after checking cell.
What is the current behavior?
The column width is reset after checking cell.
What are the steps to reproduce?
https://user-images.githubusercontent.com/7418050/198192118-789faa7e-9d66-4344-a44f-2efd3332fe5a.mp4
Any additional comments? (optional)