ember-table icon indicating copy to clipboard operation
ember-table copied to clipboard

Ember table fluid column reorder incompatibility with Ember 1.8.1

Open edelsbrunner opened this issue 11 years ago • 10 comments

Hi everyone.

After I've updated my application to ember 1.8.1, I got many problems when I reorder columns.

Always when I move a column to the first or to the last position, all my other columns disappear, and my table get messy.

I get the official example in jsbin from Addepar github page

and just changed this line: <script src="http://builds.emberjs.com/tags/v1.4.0/ember.js"></script> to this: <script src="http://builds.emberjs.com/tags/v1.8.1/ember.js"></script>

And I get the same problem as in my application, as in screenshot:

ember-table-problem

I always get this problem with "previousSibling" or "nextSibling" depends if I move a column to the first place or the last

This is the updated and problematic jsbin example: http://emberjs.jsbin.com/misatufafe/1/edit?output

anyone have any solution/workaround to this problem?

Best Regards,

Marius

edelsbrunner avatar Jan 05 '15 13:01 edelsbrunner

Hey, thanks so much for posting this! I don't know of a workaround , but I'll plan to take a look at it within the next couple days. I recently made some changes to column reordering, but it looks like the table breaks both with and without those changes.

azirbel avatar Jan 05 '15 18:01 azirbel

Hi @azirbel.

I appreciate your answer and whatever I find something else on this topic i'll keep you updated.

BR,

Marius

edelsbrunner avatar Jan 06 '15 09:01 edelsbrunner

I've fixed this issue and sent a PR.

https://github.com/Addepar/ember-table/pull/262/commits

edelsbrunner avatar Jan 21 '15 14:01 edelsbrunner

Fixed by https://github.com/Addepar/ember-table/pull/265.

azirbel avatar Jan 23 '15 06:01 azirbel

@azirbel I've just removed my fix and tested the master branch, the reordering are removing some of my columns and I get some errors: reorder_columns

Another move and: (my columns are disappearing)

even_worse

Is not working in my case.

edelsbrunner avatar Jan 26 '15 12:01 edelsbrunner

Thanks for reporting, I'm seeing the problem too. I'm able to reproduce it by reordering the last column when the table is in fluid mode. I think this is happening because of some bug that miscalculates which columns are resizable. In fluid mode, the last column is not resizable because there's no column to the right it can steal width from. When you reorder it, it looks like the column is still not resizable, which is a bug and seems to be causing this error as well.

azirbel avatar Jan 26 '15 18:01 azirbel

This seems related: https://github.com/Addepar/ember-table/pull/266 but I don't believe it solves the underlying problem. Taking a look now.

azirbel avatar Jan 26 '15 18:01 azirbel

Confirming that #266 removes the errors, but doesn't fix the problem (after moving the last column, it is still non-resizable).

azirbel avatar Jan 26 '15 18:01 azirbel

@mariuserik I just pushed a fix - https://github.com/Addepar/ember-table/pull/268. Can you see if it solves the problem for you?

azirbel avatar Jan 27 '15 00:01 azirbel

I've just checked and it works fine.

Thank you @azirbel.

edelsbrunner avatar Jan 27 '15 10:01 edelsbrunner