Ngx-datatable: Can't have table fill container with variable sized columns

Created on 9 Oct 2018  路  5Comments  路  Source: swimlane/ngx-datatable

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior
This is using the bootstrap theme.

The columnMode standard only makes the table 750px wide, except for the footer which seems to fill the container. The individual columns don't expand to fit their content. The table can be manually resized with the mouse to use more width, but it doesn't happen automatically.

In columnMode force the table does fill the container, but all columns are the same width and can't be resized.

In columnMode flex, columns are different widths in every row!

Expected behavior
I'd like to see behaviour akin to

in columnMode standard. The columns should automatically set width to best fit their content and to fill the container.

Reproduction of the problem
ngx-datatables

What is the motivation / use case for changing the behavior?
Seems pretty obvious, I want my table to fill my container

Please tell us about your environment:
npm, mac os

  • Table version:
    13.1.0

  • Angular version:
    6.1.9

  • Browser: all

  • Language: TypeScript 2.92

Most helpful comment

Facing the same issue.

All 5 comments

Facing the same issue.

yep same, also facing this issue

@atluriajith @davidfindlay did you find a solution to this issue

When sidebar toggle, dispatch then window's resize();
this.cmn.sidebar.onToggle().subscribe(() => {
setTimeout(() => { window.dispatchEvent(new Event('resize')); }, 100);
});

Bump.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

id1945 picture id1945  路  3Comments

iget-esoares picture iget-esoares  路  3Comments

ChanBen picture ChanBen  路  3Comments

dinvlad picture dinvlad  路  3Comments

TakhirMamirov picture TakhirMamirov  路  3Comments