setting the width breakpoint for responsive p-tables

UI Components for Angular
Post Reply
baskeboler
Posts: 1
Joined: 12 Oct 2018, 22:35

12 Oct 2018, 22:50

Hi guys,
I have a p-table with "responsive" set to true, so when the screen width is less than a specific breakpoint value, the default breakpoint es 560px, the rows collapse into a more mobile friendly layout. I am in need of setting this breakpoint to a different value, for example 767px, and I haven't found a way of doing this with ease. I noticed that other components, for example the carousel, has "breakpoint" property that you can set and is used along with "responsive", but had no luck with the tables. Any ideas?

jrotondo
Posts: 16
Joined: 21 Jun 2017, 17:31

15 Apr 2019, 17:28

Were you ever able to figure out how to set the breakpoint?

flauberjp
Posts: 1
Joined: 17 Jul 2019, 17:05

17 Jul 2019, 17:09

I was able to workaround it by only setting this property for p-table: [autoLayout]="true"

Example:

Previous code:
<p-table [value]="averbacaoList" selectionMode="single" [rows]="5" [paginator]="true" [alwaysShowPaginator]="false"
>


Actual code with new property set:
<p-table [value]="averbacaoList" selectionMode="single" [rows]="5" [paginator]="true" [alwaysShowPaginator]="false"
[autoLayout]="true"
>

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests