canvas-datagrid
canvas-datagrid copied to clipboard
Allow adding new rows or columns on paste
Fixes issue #552.
Changes proposed in this pull request:
- Add a new attribute,
allowGridSizeChangeOnPaste
(which isfalse
by default). If it's set totrue
and pasted data is bigger than the grid, new rows or columns will be created as needed. Please see the screen recording.
https://user-images.githubusercontent.com/25715951/230503165-b5f32a6e-8dbe-44c4-96be-8c94ae87186e.mov
This is slow for big datasets because a) .addRow()
calls .refresh()
b) on each cell pasted .selectCell()
is called. So there's plenty of room for optimization.