I’ve encountered a bug related to the DataTable column resizing, specifically affecting the last column.
Steps to reproduce:
Use a DataTable with resizeColumn configuration:
resizeColumn: {
"icon": true,
"live": true
}
Try to resize the very last column of the table.
Actual Behavior:
The last column cannot be resized at all when using the object configuration (icon: true, live: true).
Furthermore, even when using the simple resizeColumn: true setting, resizing the last column is still very difficult and inconsistent compared to other columns.
Expected Behavior: The last column should be easily resizable, and the resize handle/icon should be accessible regardless of whether it’s the last column in the grid.
Is there a known workaround for this, or could this be looked into for the next update?
It is currently impossible to directly resize the last column. This is a known limitation, and it will be addressed in one of the future releases.
An alternative suggestion is to assign "fillspace": true to the last column, so it will fill the available space. In case multiple columns have fillspace for initial sizing and you don’t want them to adjust to every future resize, you may need to change their settings after init. Here is a solution that would allow you to move the last column and resize it indirectly:
I have added a custom datatable view by using protoUI (named “datatable_custom”) with a different column resize behavior: all columns except the last one will have the "fillspace" property set to false. The last column will fill the empty space that may appear after resizing columns.
You can also prevent the last column from becoming too narrow by specifying its minWidth property.