Pager is not responsive and will overflow if table width is too small -- make pager maxSize customizable
See original GitHub issue[* ] feature request
Current behavior If the table is too small (on mobile devices, this is the case) and five pages are listed in the pager, the pager will overflow to a new line.
Expected behavior The pager should adjust the maxSize if there is not enough space.
Reproduction of the problem Decrease your browser width or test on a mobile device.
What is the motivation / use case for changing the behavior? Responsive design.
-
Table version: ^1.3.1
-
Angular version: ^2.1.2
-
Browser: all
-
Language: Typescript 2
Easiest solution I can think of is allowing the maxSize to be passed in as an input, I could implement this myself and make a pull request. Have there been any other thoughts on adding responsive functionality?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How can I limit table column width? - Stack Overflow
The question was answered in another StackOverflow thread. In short, you should just use width instead of max-width. – Mikhail Larionov. Dec 30,...
Read more >max-width - CSS: Cascading Style Sheets - MDN Web Docs
The max-width CSS property sets the maximum width of an element. It prevents the used value of the width property from becoming larger...
Read more >How to force a table into page width? - LaTeX Stack Exchange
I think this method does work when the table is small and you need to adjust it to fit the text width. However,...
Read more >Containers · Bootstrap v5.0
Responsive containers allow you to specify a class that is 100% wide until the specified breakpoint is reached, after which we apply max-width...
Read more >CSS max-width property - W3Schools
If the content is larger than the maximum width, it will automatically change the height of the element. If the content is smaller...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s the SCSS I have to override this:
The other advantage of this is that the pager grows to the left instead of changing the width of the table. With this CSS, the left text will be covered by the pager when too narrow. Not sure what the best solution is. At the moment, wrapping the count and pager won’t work.
I think, total row count should be on first line, and 2 line with center should be pager. In that way pager fits mobile size and no need to scroll