onRowDblclick not firing

UI Components for Angular
Post Reply
mcwebdev
Posts: 68
Joined: 03 Mar 2016, 02:16

29 Mar 2016, 18:44

Code: Select all

onRowDblclick //Doesn't fire 
.

Code: Select all

onRowSelect  //fires ok
.

Here is my markup

Code: Select all

(onRowDblclick)="onRowDblclick($event)" (onRowSelect)="onRowSelect($event)"

Code: Select all

onRowSelect(event) {
        this.msgs = [];
        this.msgs.push({severity: 'info', summary: 'Show Selected', detail: event.data.showName + ' - ' + event.data.showCode});
        console.log("Row Clicked");
    }

    onRowUnselect(event) {
        this.msgs = [];
        this.msgs.push({severity: 'info', summary: 'Season Unselected', detail: event.data.showName + ' - ' + event.data.showCode});
    }

    onRowDblclick(event) {
        console.log("navigate to route");
    }
I updated the package json to grab all the latest.

Code: Select all

"dependencies": {
    "angular2": "2.0.0-beta.12",
    "systemjs": "0.19.24",
    "es6-shim": "^0.35.0",
    "reflect-metadata": "0.1.2",
    "rxjs": "5.0.0-beta.2",
    "zone.js": "0.6.6",
    "primeng": "0.9.1",
    "primeui": "4.1.6"
  },

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Mar 2016, 19:21

@Trypticon, please review.

User avatar
DarthMaul
Posts: 582
Joined: 23 Nov 2015, 21:20

30 Mar 2016, 09:14

Everything looks fine your package.json is up to date so take a look at my example it's working fine.

Code: Select all

<p-dataTable [value]="cars" selectionMode="single" [(selection)]="selectedCar2" (onRowDblclick)="onRowDblclick($event)"
        (onRowSelect)="onRowSelect($event)" (onRowUnselect)="onRowUnselect($event)">
        <header>Selection with Events</header>
        <p-column field="vin" header="Vin"></p-column>
        <p-column field="year" header="Year"></p-column>
        <p-column field="brand" header="Brand"></p-column>
        <p-column field="color" header="Color"></p-column>
</p-dataTable>

Code: Select all

       onRowDblclick() {
            console.log('Hello World');
       }
Maybe you are missing something

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Mar 2016, 11:25

Does it work when you remove (onRowSelect)="onRowSelect($event)"? Maybe single click and double click is not support well at the same time?

mcwebdev
Posts: 68
Joined: 03 Mar 2016, 02:16

30 Mar 2016, 19:29

optimus.prime wrote:Does it work when you remove (onRowSelect)="onRowSelect($event)"? Maybe single click and double click is not support well at the same time?

I thought that as well at first but was not the case. It turns out it was a feature not supported in the showcase when I had cloned it but noticed it was put in on a later repo so I ported the code over, and it's now working. I'll be sure to do that as a first step in the future. Many thanks for looking into this and I apologize it was user error.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Mar 2016, 22:21

No worries, glad to hear your issue is resolved.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests