recordDoubleClick not recognized iOS/iPhone

Hi!

I'm using the recordDoubleClick  event to navigate to an item's route (client/:id).

This works on all browsers and devices except iOS/iPhone. Do you happen to know of a way to fix this? Should I use hammerjs for that?

Thanks in advance

Paul

3 Replies

MS Madhu Sudhanan P Syncfusion Team October 18, 2018 05:52 AM UTC

Hi Paul, 

In iOS/iPhone, double click event will not be triggered by default. However you can achieve your requirement by using the following solution. Please refer to the below code example, reference link and sample link. 

[component.ts] 
@Component({ 
    template: `<ejs-grid  #grid [dataSource]='data' height='315px' [selectionSettings] ='selectionOptions' (click)='click($event) > 
                <e-columns> 
                    <e-column field='OrderID' headerText='Order ID'></e-column> 
                   .  .  .                
               </e-columns> 
                </ejs-grid>` 
}) 
export class AppComponent implements OnInit { 
    .   .  . 
    click(e:any){ 
       if (e.target.classList.contains('e-rowcell')) { 
           this.clickCount++;           
          if (this.clickCount === 1) { 
          this.singleClickTimer = setTimeout(()=> { 
            this.clickCount = 0; 
            var rowInfo = this.grid.getRowInfo(e.target);  // get row information on click 
        }, 400); 
    } else if (this.clickCount === 2) { 
        clearTimeout(this.singleClickTimer); 
        this.clickCount = 0; 
        var rowInfo = this.grid.getRowInfo(e.target); // get row information on double click 
        }  
       } 
    } 
} 




Sample               : https://plnkr.co/edit/dfgKDYj35ZSFHmVki0x1?preview&p=preview  

Regards, 
Madhu Sudhanan P 



PK Paul Kocher October 22, 2018 12:16 PM UTC

Hello Madhu,

thanks for the solution. Everything works now :)




MS Madhu Sudhanan P Syncfusion Team October 22, 2018 12:28 PM UTC

Hi Paul, 
Thanks for the update. We are glad that the requirement has been achieved. 
Regards, 
Madhu Sudhanan P 


Loader.
Up arrow icon