New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[9.0.0+] Adding HyperFormula leads to "TypeError: Converting circular structure to JSON" #8728
Comments
Thank you for the report @GlennMatthys Can you help me to test it out @aninde ? |
@AMBudnik issue checked and reported as a regression. |
We have this issue as well |
My investigationUpdating the code exampleThe provided demo uses the old Vue wrapper ( I created a jsfiddle with current versions of Cause of the bugI'm not an expert in Vue, but as far as I can tell:
Recommended solutionThe Vue wrapper should be changed to handle Additional infoPassing <template>
<hot-table :settings="hotSettings" :formulas="formulas"></hot-table>
</template>
<script>
//...
export default {
data: function() {
return {
hotSettings: {
data: Handsontable.helper.createSpreadsheetData(4, 4),
colHeaders: true,
licenseKey: 'non-commercial-and-evaluation'
},
formulas: {engine: hyperformulaInstance},
}
},
components: {
HotTable
}
}
</script> Passing anything circular inside <template>
<hot-table :root="root" :settings="hotSettings"></hot-table>
</template>
<script>
//...
const circularStructure = {};
circularStructure.circularProp = circularStructure;
export default {
data: function() {
return {
hotSettings: {
data: Handsontable.helper.createSpreadsheetData(4, 4),
licenseKey: 'non-commercial-and-evaluation',
whatever: circularStructure,
},
}
},
components: {
HotTable
}
}
</script> |
I'v met the same problem, and i just rewrote the function simpleEqual in node_modules@handsontable\vue\es\vue-handsontable.mjs line 317 with the code below, and the warning has gone, hope that helpful.
|
+1 |
Hi @GlennMatthys @171h @maomaobaibai-cloud @fsnlarson We just merged the pull request that fixes this issue. We'll do our best to push it in the next release. |
fix verified with 14.1: https://jsfiddle.net/maciej_handsontable/pjdynz90/1/ |
Hi @GlennMatthys We're more than happy to announce that we just released the version that fixes this issue. Here https://handsontable.com/docs/javascript-data-grid/release-notes/#_14-1-0 you can read more about the changes |
Description
When the HyperFormula instance is added to the settings of a hot-table component, a warning from Vue is emitted about a circular JSON structure:
Steps to reproduce
See jsfiddle
Demo
Clicking "Run" hangs the browser for a while until it errors out. https://jsfiddle.net/z3568ovc/ The problem is the same but the error message is different because Vue is not running with development mode on in jsfiddle.
Your environment
The text was updated successfully, but these errors were encountered: