EasyUI Forum
April 16, 2024, 03:45:49 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: dblclickToEdit ="true"  (Read 6300 times)
dewan
Newbie
*
Posts: 24


View Profile
« on: May 13, 2020, 02:06:26 AM »

When I set dblclickToEdit to true, I double-click the edit for the first time. When you click on the second line, it becomes clickToEdit.
How can i disable single click to edit after moving to next line
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 13, 2020, 07:05:00 PM »

A possible solution to solve this issue is, listen to the 'cellClick' event and end editing when clicking another row. Please refer to the code below:
Code:
<DataGrid
      ref="dg"
      @cellClick="onCellClick($event)"
      ...
Code:
onCellClick(event){
  const dg = this.$refs.dg;
  if (dg.editingItem && event.row != dg.editingItem.row){
    this.$refs.dg.endEdit()
  }
}
Logged
dewan
Newbie
*
Posts: 24


View Profile
« Reply #2 on: May 14, 2020, 02:17:04 AM »

thank you work's great
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!