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.

Horizontal scrollbar does not appear in the wide empty table

See original GitHub issue

Describe the bug If a table is wide and empty then expectable horizontal scroll bar isn’t shown.

Tabulator Info

  • Tabulator 4.1.2
let table = new Tabulator('#table', {
  columns: [{
    field: 'column1', 
    title: 'Column 1',
    width: 200
  }, {
    field: 'column2', 
    title: 'Column 2',
    width: 500
  }, {
    field: 'column3', 
    title: 'Column 3',
    width: 1000
  }]
})

https://jsfiddle.net/dveb5Lhr/

To Reproduce Steps to reproduce the behavior:

  1. Define table without rows that’s wider than outer block.
  2. See on the result table in the browser.
  3. Table header is wider than outer block but horizontal scrollbar doesn’t appear in the table holder.

Expected behavior Horizontal scrollbar should be shown in the table holder in order to scroll table header.

Screenshots Empty table without expected scrollbar: screenshot_20181128_005700

Same table with rows: screenshot_20181128_005734

Desktop:

  • OS: LinuxMint 18.3
  • Browsers: Chromium 58.0.3029.110, Firefox 63.0.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
olifolkerdcommented, Dec 16, 2018

Hey @woxcab

I have pushed a fix for this to the master branch and will include it in this evenings patch release.

Cheers

Oli 😃

0reactions
OksanaRomanivcommented, Dec 24, 2018

Hello,

I’m having the related issue I think with tabulator-tables 4.1.4. I have a wide table (native width approximately 5000px). When I call the constructor with the next code:

new Tabulator('.es-table-paginate', {
	pagination: 'local',
	paginationSize: ESPRO_settings.tabulator_front_paginate,
	responsiveLayout: true,
});

The table fits the content width only when I see it’s initial width via JS before initializing and the horizontal scrollbar never appears. Could you please advice what I can do to create wide scrollable tables?

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I add a horizontal scroll bar to a table only if it does ...
Is there a way I can make it so that a scroll bar appears only if it's too wide? Note I tried to...
Read more >
Horizontal scroll bars are displayed on tables after publishing
Hi, For some reason, horizontal scroll bars are appearing in tables after being published. When editing the page, no scroll bars show up...
Read more >
How to find the cause of horizontal scrollbars - Polypane
The easy fix is to use width: 100% instead. Percentages don't include the width of the scrollbar, so will automatically fit. If you...
Read more >
Element size and scrolling - The Modern JavaScript Tutorial
Usually paddings are shown empty on our illustrations, but if there's ... There's no horizontal scrollbar, so it's exactly the sum of what's ......
Read more >
scrollbar-width - CSS: Cascading Style Sheets - MDN Web Docs
No scrollbar shown, however the element will still be scrollable. Note: User Agents must apply any scrollbar-width value set on the root element ......
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