Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent closing cell editor in popup mode on outside click

I have custom text editor in table cell, after I select text in it I want to use top page panel to make it bold (outside of the table), but when I click on the button (on the top page panel) this action closes cell editor popup.

Is it posible to keep the cell editor open in popup mode after I click on buttons outside of the table?

like image 422
Дмитрий Новик Avatar asked Nov 01 '18 17:11

Дмитрий Новик


People also ask

How do you prevent closing of cell editing in AG grid on other cell focus?

If you want the grid to stop editing when focus leaves the cell or the grid, set the grid property stopEditingWhenCellsLoseFocus = true . The example below shows the editing with stopEditingWhenCellsLoseFocus = true .

How do you stop cell editing on Ag grid?

Tab Key Down: Editing will stop, accepting changes, and editing will move to the next cell, or the previous cell if Shift is also pressed. Popup Editor Closed: If using popup editor, the popup is configured to close if you click outside the editor. Closing the popup triggers the grid to stop editing.

How do you make AG grid editable?

Enable Editing */> </ag-grid-angular> this. columnDefs = [ { field: 'athlete', // enables editing editable: true } ]; By default the grid provides simple string editing and stores the result as a string. The example below shows string editing enabled on all columns by setting editable=true on the defaultColDef .

How do you add edit button to Ag grid column?

You can add the button using a cellRenderer . Then when each of your button's are clicked, you can call a method to do your desired action, e.g. save row, delete row etc.


1 Answers

In the current version of ag-grid (v24), clicking outside the grid does not close a popup editor, unless you set stopEditingWhenGridLosesFocus to true in the options.

See their example: https://www.ag-grid.com/javascript-grid-cell-editing/#example-dynamic-parameters

like image 88
Matt Nienow Avatar answered Nov 07 '22 22:11

Matt Nienow