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

Closed
benjamincharity opened this Issue Dec 18, 2016 · 0 comments

Projects

None yet

2 participants

@benjamincharity
Contributor
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 https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)

Plunkr demo: http://plnkr.co/edit/25NZ7M?p=preview

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: http://plnkr.co/edit/25NZ7M?p=preview

  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>
</p-dataTable>

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:

2.3.0

  • PrimeNG version:

1.1.1

@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