canvas-datagrid icon indicating copy to clipboard operation
canvas-datagrid copied to clipboard

Allow adding new rows or columns on paste

Open romanstetsyk opened this issue 1 year ago • 0 comments

Fixes issue #552.

Changes proposed in this pull request:

  • Add a new attribute, allowGridSizeChangeOnPaste (which is false by default). If it's set to true 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.

romanstetsyk avatar Apr 06 '23 22:04 romanstetsyk