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

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

Closed
benjamincharity opened this issue Dec 18, 2016 · 0 comments · Fixed by #1614
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@benjamincharity
Copy link
Contributor

benjamincharity commented Dec 18, 2016

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 Datatable: Row based styling doesn't work if [scrollable]=true 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 the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label 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
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants