EasyUI Forum

General Category => EasyUI for Vue => Topic started by: dewan on May 13, 2020, 02:06:26 AM



Title: dblclickToEdit ="true"
Post by: dewan 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


Title: Re: dblclickToEdit ="true"
Post by: stworthy 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()
  }
}


Title: Re: dblclickToEdit ="true"
Post by: dewan on May 14, 2020, 02:17:04 AM
thank you work's great