primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.58k stars 4.61k forks source link

Row hover support to row groups #3184

Closed uvv001 closed 6 years ago

uvv001 commented 7 years ago

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) Bug demonstration: http://plnkr.co/edit/XROvUJTpkVBCcYmp4L32?p=preview

Current behavior

Create DataTable with [rowStyleClass]="rowStyle" and [rowHover]="true". Hover will be applied only on one tr tag. datatable_rowspan_hover1 datatable_rowspan_hover2

Expected behavior

Hover should apply on whole visible row, like this: default

michealharrington commented 7 years ago

+1

cagataycivici commented 6 years ago

p-dataTable is deprecated and will be removed in favor of the new p-table (aka TurboTable) of 5.1.0 so closing the issue. Please try the new p-table once 5.1.0 is released.

samdidos commented 4 years ago

Is this issue has been created for TurboTable? Because I'm still seeing this issue.

I've cloned the whole primeng v9.0.0-rc.2 project and changed the following in tablegroupdemo.html :

// src/app/showcase/components/table/tablegroupdemo.html:66

    <h3>Rowspan</h3>
    <p-table [value]="cars" sortField="brand" sortMode="single" (onSort)="onSort()" rowHover="true"> // <-- rowHover here
        <ng-template pTemplate="header">
            <tr>
                <th>Brand</th>
                <th>Vin</th>
                <th>Year</th>
                <th>Color</th>
            </tr>
        </ng-template>
        <ng-template pTemplate="body" let-rowData let-rowIndex="rowIndex">
            <tr class="ui-selectable-row"> // <-- ui-selectable-row here
                <td *ngIf="rowGroupMetadata[rowData.brand].index === rowIndex" [attr.rowspan]="rowGroupMetadata[rowData.brand].size">
                    {{rowData.brand}}
                </td>
                <td>{{rowData.vin}}</td>
                <td>{{rowData.year}}</td>
                <td>{{rowData.color}}</td>
            </tr>
        </ng-template>
    </p-table>

Also I think it would make sense to emphase the row-related spanned element for each hovered individual rows, not only the first one.

Actual behavior

27466667-83d17bc4-5806-11e7-81b8-6e278c6c0be1 27466668-85c56b70-5806-11e7-84e5-1592a7769511

Desired behavior

27466667-83d17bc4-5806-11e7-81b8-6e278c6c0be1 issue-primeng

pkpalanisamy commented 3 years ago

This issue is still present in prime-ng 11.2.0 as well. bug is really fixed or not? image

justcoder1 commented 2 years ago

Is there a resolution to this issue? As I am using conditional formatting this also raises an issue here, see image below:

image

When the active checkbox is unchecked it should grey the hole row out. This is just test data so happy to share image.