does anyone have a working example using meteor and handsontable to create a reactive table to read and update the data?
Thanks in advance for any help
does anyone have a working example using meteor and handsontable to create a reactive table to read and update the data?
Thanks in advance for any help
The following example works as a reactive table that reads and writes data, including paste and autofill.
I'm not aware of a Meteor smartpackage that makes available the standard Handsontable API. (There is one smartpackage by Olragon, but it's for the jQuery API of Handsontable). You can add the files to your project directly fairly easily:
Open handsontable.full.js and change the following line:
You may need to uninstall any existing Handsontable smartpackages
Next add a new template to your html where your Handsontable will be located:
Finally in your js file:
Docs on afterChange API is here: https://github.com/handsontable/handsontable/wiki/Events
This code will render your collection's fields as columns automatically, including an _id column. To define columns using Handsontable in Meteor, here's an example document in the sample collection Books:
We can specify our columns so that _id does not show up, as well as (optionally) give names to our colHeaders: