Hey,
I have complex objects lying behind each cell of my table. In order to display the values correctly I had to write a custom cell-renderer and a custom-editor. That works fine so far but I ran into problems when trying to copy and paste from/to handsontable.
To solve the copy-issue ([Object object]) I had to overwrite the toString() method of my objects. Paste was a little more complex, since plain values have to be converted into objects again. I did not find a solution to this without modifying handsontable-code, which i’d rather not touch.
My object looks like this:
{
value: xxx,
comment: yyy
}
I changed the following lines (starting at line 4801, Version: 1.4.0, baseVersion: 0.25.0) in handsontable.full.js
} else if (orgValue !== null && typeof orgValue === 'object') {
value = {
value: value,
toString: function () { return this.value }
};
//pushData = false;
}
My question is:
- Is there another solution to this issue
- If not, would it be possible to provide a hook (so that I don’t need to modify handsontable-code)
Best regards
Tom