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

Cannot set ColumnWidth in version 0.4.0

Open edelsbrunner opened this issue 11 years ago • 4 comments

Hi everyone.

After I've updated my application to use ember-table 0.4.0, I didnt get the column width to work anymore

Setting one columnWidth: 150 and another columnWidth: 80 dont make difference, when I run both have same size.

I've also tried with defaultColumnWidth (as described in documentation)

I get the official example in jsbin from Addepar github page

and just changed this line: <script src="http://rawgit.com/Addepar/ember-table/v0.2.4/dist/ember-table.js"></script> to this: <script src="http://rawgit.com/Addepar/ember-table/v0.4.0/dist/ember-table.js"></script> (same for .css file)

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

width_problem

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

anyone have any solution/workaround to this problem?

Best Regards,

Marius

edelsbrunner avatar Jan 09 '15 16:01 edelsbrunner

I'm sorry @mariuserik! This is my mistake, it seems I didn't fully update the documentation.

In v0.4.0, defaultColumnWidth has been removed; instead, use savedWidth.

We made this change in part so that there's a convenient way to save column widths - just persist savedWidth, which is updated whenever the user resizes a column by clicking and dragging. (If this behavior doesn't matter to you, it's fine; just use savedWidth to set the initial width and then ignore it after that).

azirbel avatar Jan 09 '15 19:01 azirbel

I will update the CHANGELOG and documentation now.

azirbel avatar Jan 09 '15 19:01 azirbel

https://github.com/Addepar/ember-table/pull/254

azirbel avatar Jan 09 '15 19:01 azirbel

Hi @azirbel.

Thank you for your reply.

savedWidth work exactly as expected.

Best Regards,

Marius Edelsbrunner

edelsbrunner avatar Jan 12 '15 09:01 edelsbrunner