You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the new (RC14) DataTable plugin "ResizeColumnsPlugin", the DataTable does not remember the column widths and will use the default widths (default or set via TableConfig) when loading the new data. This causes the headers to not be aligned with the columns.
To reproduce, create a DataTable with the ResizeColumnsPlugin. Load some data. Resize a column. Replace the store data:
dataSource.setData(newList);
dataTable.load();
Simple setup to reproduce (not including the generateData function)
Use dynamic CSS and make a class name for each column; then changing the width just requires update the styles of a single CSSRule; which will automatically set for all cells. Then, when appending new TableRecords on the data table, it just has to apply the same class name for each column. Drag and Drop resizing no longer requires iterating across all cells to update.
Probably a faster implementation as it doesn't require rewrite: When resizing a column; it may make sense to update the TableConfig/Column and set the width appropriately. This way, when new data is appended, and it's going through the mechanism for setting cell widths, it'll just grab through the current convention of getting the Column definition.
The text was updated successfully, but these errors were encountered:
When using the new (RC14) DataTable plugin "ResizeColumnsPlugin", the DataTable does not remember the column widths and will use the default widths (default or set via TableConfig) when loading the new data. This causes the headers to not be aligned with the columns.
To reproduce, create a DataTable with the ResizeColumnsPlugin. Load some data. Resize a column. Replace the store data:
Simple setup to reproduce (not including the generateData function)
Screenshots:
Before reload:
![image](https://user-images.githubusercontent.com/861908/204807934-97228897-eb08-4384-896b-21cc79fc153b.png)
After reload:
![image](https://user-images.githubusercontent.com/861908/204807751-5d28f04c-00b6-4651-aebd-6231b91d3fea.png)
Possible couple solutions:
The text was updated successfully, but these errors were encountered: