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.

Table Component (scroll.x dynamic)

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

My problem is to set the scroll.x to be dynamic. The current implementation is to have a dynamic column and rows, but the scroll.x in need to be set manually. And I cannot get the width of the table when setting it to default. Please.

What does the proposed API look like?

const columns = [
  { title: "Full Name", dataIndex: "name", key: "name", width: 200 },
  { title: "Age", dataIndex: "age", key: "age", }, // dynamic
  { title: "Column 1", dataIndex: "address", key: "1", }, // dynamic
  { title: "Column 2", dataIndex: "address", key: "2", },// dynamic
  { title: "Column 3", dataIndex: "address", key: "3", },// dynamic
  { title: "Column 4", dataIndex: "address", key: "4", },// dynamic
  { title: "Column 5", dataIndex: "address", key: "5", },// dynamic
  { title: "Column 6", dataIndex: "address", key: "6", },// dynamic
  { title: "Column 7", dataIndex: "address", key: "7", },// dynamic
  { title: "Status", dataIndex: "status", key: "8", fixed: "right", width: 150 }, // dynamic
  { title: "Sub-Status", dataIndex: "substatus", key: "9", fixed: "right", width: 150 }// dynamic
];

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

30reactions
afaqahmedkhancommented, Aug 26, 2019

I tried scroll={{ x: 'max-content' }} and it works for the same issue

16reactions
andribizcommented, Oct 4, 2019

I tried scroll={{ x: 'max-content' }} and it works for the same issue

This should be in official documentation. It will save a lot of time and headache

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ant Design Table with vertical and horizontal scroll
Speaking of columns, I have to extract the key from the table source in order to generate the columns dynamically. Is it possible...
Read more >
Scroll - horizontal - DataTables example
DataTables has the ability to show tables with horizontal scrolling, which is very useful for when you have a wide table, but want...
Read more >
Bootstrap 4 table scroll - examples & tutorial.
Bootstrap table scroll functionality works vertically (y axis) and horizontally (x axis). You can use it as an alternative for the pagination.
Read more >
How To Create A Responsive Table - W3Schools
Responsive Tables. A responsive table will display a horizontal scroll bar if the screen is too small to display the full content. Resize...
Read more >
Overflow - Tailwind CSS
Scrolling horizontally always. Use overflow-x-scroll to allow horizontal scrolling and always show scrollbars unless always-visible scrollbars are disabled by ...
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