KoGrid
KoGrid copied to clipboard
Retain resized column width after sort.
We have grid where all columns are resizable and sortable. When resizing a sortable column on the mouseup event sort is being invoked. Whenever sort is called the width of the columns are being reset to their initial value. Is it possible to...
- Prevent the call to sort on the mouseup event from the resize grip
- Retain a columns width post sort rather than resetting the columns width to its original value.
Thanks!
The column width does not seem to be retained if externalSorting is set to true. See the following jsfiddle for an example - http://jsfiddle.net/zSpMh/1/. Steps to recreate:
- Resize a column width
- Click header to sort.
- The original column width is restored
Also if you hover over the columns which were just resized you'll notice that they go into cursor: default or cursor: col-resize mode. See attached photo. Also notice the undefined css class in the header column. It has to do with headerClass() when a headerClass is not defined in the column definition.
My sorting is not external and the columns behave properly upon sort. However, the columns reset as described upon resizing the viewport.
I've noticed this issue happens with Deferred Updates plugin. Without this plugin koGrid keeps columns widths after sort. Maybe it can help.