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.

Can table me made responsive ?

See original GitHub issue

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

Current behavior I have a table with 10 rows, displayed great on my site, but as my site should be mobile friendly I can’t get the table to look good when on mobile.

Expected behavior

I would like to have some of my column header text wrap and increass in hight, I would like to set which column will have such behavior. I would like my words to break as well.

In general I would like it to look good.

Reproduction of the problem

Take any of your demo, shrink the browser and see the issue.

What is the motivation / use case for changing the behavior?

Web responsiveness

Please tell us about your environment:

Google chrome, vs code, npm, .net

  • Table version: 0.7.x

4.1.0

  • Angular version: 2.0.x

2.42

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Chrome

  • Language: [all | TypeScript X.X | ES6/7 | ES5] TS

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:16
  • Comments:30 (9 by maintainers)

github_iconTop GitHub Comments

18reactions
samarismcommented, Feb 16, 2017

The table examples at the: demo site do appear to be responsive.

responsive

The demo link uses the following configuration for the datatable:

<ngx-datatable class="material" [rows]="rows" [loadingIndicator]="loadingIndicator" [columns]="columns" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50" [rowHeight]="'auto'"> </ngx-datatable>

However, on my local setup with the same configuration, the tables do not change their size at all. Anything I am missing here?

13reactions
PeterSawyercommented, May 11, 2017

The ember mobile size looks great, love to see a mobile-first responsive web design come to this excellent datatable Austin.

My current workaround is to size with standard column and turn on the scroll bar when under 1200 pixels wide (smaller than BS large displays). But the column headers are not part of the scroll. 😦

View snipped: -

    <ngx-datatable [columnMode]="'standard'" [scrollbarH]="scrollBarHorizontal"
...

Component snippet

  scrollBarHorizontal = (window.innerWidth < 1200);

  constructor() {
    window.onresize = () => {
      this.scrollBarHorizontal = (window.innerWidth < 1200);
    };
  }

Love this component 😃 Peter

Read more comments on GitHub >

github_iconTop Results From Across the Web

Responsive Data Tables | CSS-Tricks
Responsive design is all about adjusting designs to accommodate screens of different sizes.
Read more >
How to make an html table responsive - css - Stack Overflow
You can use bootstrap to make table responsive. Define class as table-responsive to make table as responsive. <div class="table-responsive"> ...
Read more >
Making a table responsive using CSS - Flavio Copes
So I started searching for a good way to make my table responsive. I came across this very nice article on CSS Tricks:...
Read more >
How to Create Responsive Tables using CSS without 'table' Tag
So, it's all about CSS? ... Yes. Using only CSS we can achieve this because of a special property provided. This styling is...
Read more >
Accessible Front-End Patterns For Responsive Tables (Part 1)
In this article, we're going to be strictly focused on various ways we can make tables on the web responsive, depending on the...
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