I bought handsontable-pro but I am confused about the difference between those 2 packages. Right now handsontable is at version 0.23.0 Handsontable-pro seems to be at version 1.2.0. A diff of both reveals just a few differences. What’s should I use to have the most up to date version of handsontable?
Files handsontable/.bower.json and handsontable-pro/.bower.json differ
Files handsontable/bower.json and handsontable-pro/bower.json differ
Only in handsontable: CHANGELOG.md
Only in handsontable: CNAME
Only in handsontable: CONTRIBUTING.md
Files handsontable/dist/handsontable.css and handsontable-pro/dist/handsontable.css differ
Files handsontable/dist/handsontable.full.css and handsontable-pro/dist/handsontable.full.css differ
Files handsontable/dist/handsontable.full.js and handsontable-pro/dist/handsontable.full.js differ
Files handsontable/dist/handsontable.full.min.css and handsontable-pro/dist/handsontable.full.min.css differ
Files handsontable/dist/handsontable.full.min.js and handsontable-pro/dist/handsontable.full.min.js differ
Files handsontable/dist/handsontable.js and handsontable-pro/dist/handsontable.js differ
Files handsontable/dist/handsontable.min.css and handsontable-pro/dist/handsontable.min.css differ
Files handsontable/dist/handsontable.min.js and handsontable-pro/dist/handsontable.min.js differ
Files handsontable/dist/moment/moment.js and handsontable-pro/dist/moment/moment.js differ
Only in handsontable/dist: README.md
Files handsontable/Gruntfile.js and handsontable-pro/Gruntfile.js differ
Only in handsontable: handsontable.jquery.json
Only in handsontable: index.html
Only in handsontable: lib
Files handsontable/LICENSE and handsontable-pro/LICENSE differ
Files handsontable/package.json and handsontable-pro/package.json differ
Only in handsontable: plugins
Files handsontable/README.md and handsontable-pro/README.md differ
Only in handsontable: tasks
Only in handsontable: update.json
That is what I thought. However when I diff the 2 directories I don’t see any major differences. What re those additional features and where can I find them?
main .js file of PRO has few more merges than .js file for a regular version. I don’t know do you want to check it line by line but better way is to just compare the catalog tree from both of them.
Are those features documented anywhere? Ther README.md is kind of empty.
And where is the source? I am asking because I am debugging and the handsontable.js is uglified in some way making debugging very hard. I see variables like $_46__46__47__46__46__47__46__46__47_helpers_47_object
This line is made for helpers like the once which creates an array of arrays or an array of obkect to handsontable in example: Handsontable.helper.createSpreadsheetData(row, col)
and Handsontable.helper.createSpreadsheetObjectData(row, col)
Helpers are usually used only by our developers and to serve quick demo examples - they’re not in the documetnantion.
If you installed Handsontable PRO via bower then you got only dist/ (uglified) files. If you want to look up into source code you should download it from our repository by git clone git@git.handsontable.com:handsontable/handsontable-pro.git.
I looked at the function you pointed me to Handsontable.helper.createSpreadsheetObjectData(row, col) but this seems to create rows of object. What I am looking for is that a particular cell be an object not a number or a string.
For example let’s day we have 3 columns composed of a number, a string, and a custom object. Obviously for my 3rd column I will have a custom editor and a custom renderer. Let’s say this object is an address composed like { street: ‘xxxx’, state: ‘xx’, zip: ‘xxxx’ }. My custom editor could present a nice popover or even better use google address completion. I don’t want to return a string (want to keep all info like coord and such), so I would expect my custom editor to return an object and then my custom renderer would take that object and display it as a string representation.
Is that possible? Right now my test seems to indicate I need to return a string. Therefore I am JSON.stringify my object and my renderer parses it before making a string representation of it. That works but now I also need to denormalize my array before saving to database. I would prefer to just deal with object
If I’m understanding it correctly @pdemilly - and if I’m not just let me know - you would like to have nested objects as a part of your data source.
If that’s it there’s an option to use Handsontable as a cell’s source. Here’s the tutorial: https://docs.handsontable.com/0.23.0/demo-handsontable.html
The cell can have an object as a value but it has some restrictions. In this restrictions every cell must have an object with the same count of properties otherwise Handsontable engine revokes changes (bug #3234).
This is exactly what I was trying to achieve. So if I understand correctly, I need to make sure that the object returned from editor has the same prototype profile than what was in that cell priorly from being edited. What about new rows? Obviously at that point, each cell is empty. How would this work? As the original poster of the bug #3234 I think any value returned by an editor should be acceptable. It is the editor responsibility to do validation, isn’t it?
I have updated the jsfiddle to include angular as this is what I am using. If you comment the initial data from $scope.data (line 92) then the dataset cannot be updated. http://jsfiddle.net/pdemilly/o4fr0nrr/
Yes, you make sure that editor returns object with the same keys. Handsontable on first initialization creates data schema based on first row. When you want to add new row added row will be compared to data schema and if won’t match then it gets revoked.
Any possibility to have an option in the settings to let us decide to accept anything in any cells. Since we already control the editor and renderer, it seems possible that we want to handle each cell freely.
Currently there is no options to change this behavior. There is a plan to change this fragment of code to be more flexible - as described in #3234 but I don’t know when it will be changed.