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

No column auto resizing when manual resizing disabled

Open cyk opened this issue 7 years ago • 0 comments

There seems to be no v2 equivalent for the the legacy column configuration:

// Column cannot be manually resized, but automatically resizes to fill space in the table.
canAutoResize: true,
isResizable: false,

I think this is related to the isResizable option being more restrictive than its predecessor: the column cannot be resized manually or automatically. It overrides "equal-column" fill mode and "eq-container" width constraint.

For example...
let legacyColumns = [
  { headerCellName: 'A', contentPath: 'A', canAutoResize: true, isResizable: false },
  // ...B, C..
];

let columns = [
  { name: 'A', valuePath: 'A', isResizable: false },
  // ...B, C...
]
<h4>ember-table-legacy</h4>
{{ember-table-legacy
  columns=legacyColumns
  content=rows
  hasFooter=false
}}

<h4>ember-table (v2)</h4>
{{#ember-table as |t|}}
  {{ember-thead api=t 
    columns=columns
    fillMode="equal-column"
    resizeMode="fluid"
    widthConstraint="eq-container"
  }}

  {{ember-tbody api=t rows=rows}}
{{/ember-table}}

et2_etl_is_resizable_false

If you enable isResizable for v2, columns spread equally (but manually resizable)...

et2_etl_is_et2_resizable_true

cyk avatar Oct 04 '18 17:10 cyk