Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row should call getRowStyleClass even if table is scrollable #1614

Merged
merged 1 commit into from
Dec 20, 2016
Merged

Row should call getRowStyleClass even if table is scrollable #1614

merged 1 commit into from
Dec 20, 2016

Conversation

benjamincharity
Copy link
Contributor

@benjamincharity benjamincharity commented Dec 18, 2016

This fixes #1613


Bug:

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

@cagataycivici cagataycivici merged commit 222b98a into primefaces:master Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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