question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for custom column width

See original GitHub issue

Hi It would be nice to add support for custom column width.

like below

doc.autoTable( 
[ 
  { title : "ID", key : "id" , width: 30} ,
  { title : " Name" , key : "name"}
] , data , {});

This way I can define the width of some columns and let the plugin use the rest of the space dynamically

And thanks for the great plugin 👍 😃

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
Pikeshcommented, Aug 17, 2017

I think those were older configurations. I went throught the releases, and found the proper way now, is:

doc.autoTable(columns,rows,{
        addPageContent:pageContent,
        margin: {horizontal:5,top: 20},
        startY: 0.47*doc.internal.pageSize.height,
        styles: {overflow: 'linebreak'},
        columnStyles: {id: {columnWidth: 25}, name:{columnWidth:40}, role: {columnWidth: 15}, location: {columnWidth: 30}}
      });
0reactions
Pikeshcommented, Aug 17, 2017

Hey Simon, the example link is not working. Can you check it.

Thanks for an amazing plugin!

Read more comments on GitHub >

github_iconTop Results From Across the Web

column-width - CSS: Cascading Style Sheets - MDN Web Docs
The column-width CSS property sets the ideal column width in a multi-column layout. The container will have as many columns as can fit ......
Read more >
Change the column width and row height - Microsoft Support
Tip: To quickly set the width of a single column, right-click the selected column, click Column Width, type the value that you want,...
Read more >
Customizing Column Widths with CSS
The column widths can be adjusted beyond the defaults in the pre-made and Theme Builder themes using the Custom CSS feature. Custom CSS...
Read more >
How can I have custom column widths? - GeneratePress
The builder offers columns 33-33-33%, 30-70% width, etc. How could I have 20-80% width containers or something custom?
Read more >
Custom Column Widths - WordPress.org
[This thread is closed.] I'm trying to set column widths via CSS. It was going to be added via this support thread: https://wordpress.…...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found