olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.74k stars 817 forks source link

Editing textarea must cause table height recalc #2961

Closed nukeruseg closed 4 years ago

nukeruseg commented 4 years ago

Describe the bug When editing textarea if you insert new line symbol table height not changing

Tabulator Info 4.7.2

Working Example https://jsfiddle.net/L1eswq7n/6/

To Reproduce A step by step guide to recreate the issue in your JS Fiddle or Codepen:

  1. Go to Name column editing of any row
  2. Press enter few times
  3. See error

Expected behavior Table (.tabulator-tableHolder) height changing with changes of cell height

nukeruseg commented 4 years ago

Also, if I manually try to change .tabulator-tableHolder height on input event of textarea it causes to exit edit mode (cellEdited event raised and textarea renders as text)

olifolkerd commented 4 years ago

If you want the table to render in classic mode, and resize with its contents then you need to set the virtualDom property to false in the table constructor:

var table = new Tabulator(".tabulator-table", {
    virtualDom:false,
});

Cheers

Oli :)