Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datatable: Width of Columns #957

Closed
msteinbeck opened this issue Jun 18, 2018 · 3 comments
Closed

Datatable: Width of Columns #957

msteinbeck opened this issue Jun 18, 2018 · 3 comments
Assignees
Milestone

Comments

@msteinbeck
Copy link

I would like to configure the width of the columns of a datatable. According to https://datatables.net/reference/option/columns.width I can use "columnDefs" to set the width for each column. I tried to set the desired values with "columnInfo" without any luck. Is there a simple way to set the width of columns?

@joepal1976
Copy link

You can use custom-options on dataTableColumn, like so:

<b:dataTableColumn custom-options="'width':'150px'">

Note that it is 'width' and '150px'. Not including the 's will cause a javascript crash.

@chongma
Copy link
Collaborator

chongma commented Jul 12, 2018

should it pass the width property through as an attribute of b:dataTableColumn? or should it just be specified in style or as a custom-option?

@stephanrauh
Copy link
Collaborator

It sounds sensible to me to add a width attribute, so I implemented the feature.

@stephanrauh stephanrauh self-assigned this Jul 27, 2018
@stephanrauh stephanrauh added this to the v1.5.0 milestone Jul 27, 2018
@stephanrauh stephanrauh modified the milestones: v1.5.0, v1.4.0 Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants