Primeng: Missing double click event on TurboTable

Created on 19 Jan 2018  路  3Comments  路  Source: primefaces/primeng

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

[X] bug report => Search github for a similar issue or PR before submitting
[X] 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

I don't know if this is to be done for the 5.2.0-rc.2, but please add the onRowDblclick event to the TurboTable.

P.S.:
As an off-topic side note: When you re-integrate the shift key selection to the TurboTable, please add the ctrl key selection, too. And please change the way the multiple selection behaves back to the way it was in DataTable (multiple rows are only selected if a meta key was pressed, not with a "default" click).

Most helpful comment

You can do;

<p-table [value]="cars">
    <ng-template pTemplate="header">
            <tr>
                <th>Vin</th>
                <th>Year</th>
                <th>Brand</th>
                <th>Color</th>
            </tr>
        </ng-template>
        <ng-template pTemplate="body" let-car>
            <tr (dblclick)="onRowDblClick($event, car)">
                <td>{{car.vin}}</td>
                <td>{{car.year}}</td>
                <td>{{car.brand}}</td>
                <td>{{car.color}}</td>
            </tr>
        </ng-template>
    </p-table>

onRowDblClick(event, rowData) { // }

All 3 comments

This probably doesn't need to be said but just to be sure - in my project we like the default behavior of selection in p-table, previously achieved in p-dataTable by the "metaKeySelection"=false property. I'm sure you have it on the your to-do regardless though because of the mobile/touch friendly implications. Thanks!

I'd have no problem with it being the default behavior as long as an option to activate the prior behavior is given :) I think it is quite a default behavior in lists/tables/trees/... everywhere: Normal clicking selects one item, clicking with ctrl allows for multiple selections and shift key allows for range selection.

You can do;

<p-table [value]="cars">
    <ng-template pTemplate="header">
            <tr>
                <th>Vin</th>
                <th>Year</th>
                <th>Brand</th>
                <th>Color</th>
            </tr>
        </ng-template>
        <ng-template pTemplate="body" let-car>
            <tr (dblclick)="onRowDblClick($event, car)">
                <td>{{car.vin}}</td>
                <td>{{car.year}}</td>
                <td>{{car.brand}}</td>
                <td>{{car.color}}</td>
            </tr>
        </ng-template>
    </p-table>

onRowDblClick(event, rowData) { // }

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lilling picture lilling  路  3Comments

papiroca-tm picture papiroca-tm  路  3Comments

just-paja picture just-paja  路  3Comments

Helayxa picture Helayxa  路  3Comments

Helayxa picture Helayxa  路  3Comments