简体   繁体   中英

ag-grid cell editor before open event

i have a situation where i have a grid with rows. on a cell double click, cell editor is opened. there are events arround celleditor cellEditingStarted and cellEditingStarted where you can do something if needed. i need an event which is just before the celleditor opened.

a user double clicked the cell, need to do some thing there and the cell editor pops out after that.

is there something like that? cant find in documentation.

what i want to do is: custom cell editor pops out of the grid, and when the grid is near the bottom of screen, the cell editor is only half visible, and i made a trick, put a div under the grid and on adding a row, that div enlarges its height so it works fine, but cant make it work when you double click that cell, it doesn't scroll properly

在此处输入图像描述 thanks

You can use the agInit lifecycle method inside the Custom Cell Editor to handle this use case as it is fired before cellEditingStarted :

export class MoodEditor implements ICellEditorAngularComp {

  agInit(params: any): void {
    console.log('agInit, handle logic here');
  }

// ...

You can verify this in the following plunkr , open the developer console to see the console log statements.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM