awsp / handsontable-meteor

Handsontable in MeteorJS
MIT License
14 stars 5 forks source link

Meteor Handsontable (@version 0.16.1)

This package uses the latest version of Handsontable (currently @version 0.24.1) in MeteorJS.

Installation

Important Notes

This package contains the latest yet slightly modified version of Handsontable (version 0.24.1). Minor change has been made to the UI as well. The new version of Handsontable no longer necessary requires jQuery to work. In order to introduce the latest Handsontable to Meteor, a minimum of modification was made to Handsontable in this package to fix some of the conflicts when used in Meteor.

The new way of initializing Handsontable is by following,

  var data = function () {
    return Handsontable.helper.createSpreadsheetData(100, 10);
  };

  var container = document.getElementById('example');

  var hot = new Handsontable(container, {
    data: data(),
    minSpareCols: 1,
    minSpareRows: 1,
    rowHeaders: true,
    colHeaders: true,
    contextMenu: true
  });

It is also possible to do in the old jQuery way.

$("#hot3").handsontable({
    data: data,
    minSpareRows: 1,
    colHeaders: true,
    contextMenu: true
});

Known Issue - Formula Support (Updated Jan 17, 2016)

Starting from package version 0.7.0, you could also enable formulas in Handsontable. This package uses the default styling from Handsontable and RuleJS. However, you can always customize to your own by changing the following 2 classes in CSS.

$("#hot3").handsontable({
    formulas: true, // Add this line to enable formulas support
    data: data,
    minSpareRows: 1,
    colHeaders: true,
    contextMenu: true
});

For more details on usage and supported formulas,

Notes about formula support.

Formula support does not work with autofilling with Handsontable 0.14+.

Release Notes

GitHub / Bug Reports

https://github.com/awsp/handsontable-meteor

Versions Tracking

License

MIT License