How to make cell display all of textarea in AgGrid?

Viewed 12

I would like AgGrid to look like this Google Spreadsheet, where the editor shows all of the textarea content, and when in read-mode (non-edit mode), the cell stretches to show all the text. Here is the Google sheet.

enter image description here

Here is what I have by default with my AgGrid:

enter image description here

Notice how (a) it is showing it the same height as the rest of the "input" one-liner cells (in non-edit mode), and (b) edit mode it is still condensing it. It should expand to fill the area. This is basically what I have to create my dynamic columns:

const editableColumns: Array<ColumnType> =
  data?.nodes.map(node => ({
    suppressMenu: true,
    sortable: false,
    headerName: node.title,
    field: node.id,
    editable: true,
    cellEditor: 'agLargeTextCellEditor',
  })) ?? [];

I used agLargeTextCellEditor to try and get the texteditor, which preserves new lines for example, so that's good. But do I need to implement my own editor, or can I use some sort of default behavior to make it more like the Google sheet above?

0 Answers
Related