Ember table fluid cannot resize a column after sorting
Hi everyone. I'm using Ember 1.8.1 and Ember table in master branch state.
I've a fluid table and all columns from this table are sortable by clicking at the columns header.
I'm able to change the size of the columns from my table until the moment I sort some column.
Always when I sort a column, all my columns get reset to the original position (if I changed the position) and from this moment on I cannot get a column in the border and resize them and the mouse cursor style gets stuck in the "pointer".
Someone else have this problem?
Best Regards,
Marius
Hi @mariuserik -
Is this the same/related to https://github.com/Addepar/ember-table/issues/243?
I made some fixes in https://github.com/Addepar/ember-table/pull/268 but forgot to merge it until today. Sorry about that. Is this fixed on current master?
Hi @azirbel.
Thank you for your reply.
This is not the same as #243. I was already using the azirbel/reorder-and-resize-fixes branch.
The problem is now when you click in a column header, to sort a column.
After sorting you cannot resize them, and if you changed the order from any column and then click to sort, they get back to the original order.
The problem from columns disappearing is fixed* this sort bug began after the fix.
@azirbel I've just made a change to my table, I've removed the "columnMode: fluid" and added a canAutoResize: yes to the columns.
I generate the table and resize one column (this way it changes the initial width). Then I click in the header of any column to order the table by this column.
Thats what I see:

in short: if you change the column size, and try to sort by any column, they all lose their size.
Sorting is creating different problems with fluid and not-fluid table.
Ok. How did you implement sorting? Is this something you might be able to reproduce in a JS Bin?
If I were debugging this, I might start by putting a breakpoint in doForceFillColumns (in the ember-table code) and seeing if that gets triggered on column sort, and whether it does the right thing.
You might also check your configuration by finding the table component in the ember inspector, and seeing the results of:
$E.get('columns').mapBy('width')
$E.get('columns').mapBy('savedWidth')
$E.get('columns').mapBy('nextResizableColumn')
Hi @azirbel.
Thank you for your answer, it helped me solve the problem.
The first problem with the columns is that I was using small values in savedWidth (between 1 and 12).
When I don't use columnMode = "fluid" but use canAutoResize=true in the first load of my table it will fit all my columns to the table size (because it is proportional), but if I resize some column this canAutoResize is not valid any more, because my table is not fluid.
So my width is not proportional any more but real pixel size, and when I was clicking in sort it was reloading my columns with this small pixels size.
After this I had to do some changes in my sorting too, to get the table to remember the position of my reordered and resized columns.
I'm closing this ticket, after all is not a bug of ember-table.