How does [pSelectableRowDisabled] work in PrimeNg Table

UI Components for Angular
Post Reply
gan
Posts: 8
Joined: 22 Oct 2018, 10:21

23 Oct 2018, 10:45

Hello,

I'm looking for information about using [pSelectableRowDisabled] in PrimeNg Table.

If you had items or even see an example of use.

Cordially

Ferdjinand
Posts: 1
Joined: 12 Jan 2021, 11:41

12 Jan 2021, 11:53

In case someone comes here looking for instructions:

Just add pSelectableRowDisabled to a <tr></tr> and pass a true/false value to it.
This basically removes the "tabindex" attribute from the tr element where you apply it.

For example:

Code: Select all

<p-table>
  <tr>
    <th>
    </th>
  </tr>
  <tr [pSelectableRowDisabled]="true">
    <td>
         Unselectable Row
    </td>
  </tr>
</p-table>
One can also provide a variable to change this conditionally.

sonicwong
Posts: 3
Joined: 02 Jan 2020, 04:37

13 Jan 2021, 11:32

Also, you can add style "pointer-events: none;" to tr to disable mouse hover row background color change.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests