added height/width constraint to canvas-datagrid

This commit is contained in:
Tony Germaneri 2018-01-22 14:35:11 -08:00
parent c654a2656b
commit 376db8fe9f
2 changed files with 9 additions and 0 deletions

@ -34,6 +34,13 @@ var grid = canvasDatagrid({
});
```
For large data sets, it's necessary to constrain the size of the grid.
```js
grid.style.height = '100%';
grid.style.width = '100%';
```
Once the workbook is read and the worksheet is selected, assigning the data
variable automatically updates the view:

@ -64,6 +64,8 @@ var process_wb = (function() {
/* update canvas-datagrid */
if(!cDg) cDg = canvasDatagrid({ parentNode:HTMLOUT, data:data });
cDg.style.height = '100%';
cDg.style.width = '100%';
cDg.data = data;
XPORT.disabled = false;