Datatable: [rowStyleClass] method isn't called if the table has [scrollable]=true #1613

benjamincharity opened this Issue Dec 18, 2016 · 0 comments


None yet

2 participants

benjamincharity commented Dec 18, 2016 edited

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already
[ ] support request => Please do not submit support request here, instead see

Plunkr Case (Bug Reports)

Plunkr demo:

Current behavior

If the table has [scrollable] set to true, the method passed to [rowStyleClass] is never called. If the table is not scrollable, the method is called as expected.

Expected behavior

The method passed to [rowStyleClass] should be called for every row; even if the table is scrollable.

Minimal reproduction of the problem with instructions

Plunkr demo:

  1. Define a table with scrollable set to true:
  2. Pass a method to rowStyleClass that should be called with row data:
<p-dataTable [value]="items" [scrollable]="false" [rowStyleClass]="tableOneHighlight">
    <p-column field="id" header="ID"></p-column>
    <p-column field="name" header="Name"></p-column>

What is the motivation / use case for changing the behavior?
I need to add a custom class to rows even when inside a scrollable table

  • Angular version:


  • PrimeNG version:


@benjamincharity benjamincharity changed the title from Datatable: Row based styling doesn't work if [scrollable]=true to Datatable: [rowStyleClass] method isn't called if the table has [scrollable]=true Dec 18, 2016
@cagataycivici cagataycivici self-assigned this Dec 20, 2016
@cagataycivici cagataycivici added this to the 1.1.1 milestone Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment