antoniandre / splitpanes

A Vue 3 (and 2) reliable, simple and touch-ready panes splitter / resizer.
https://antoniandre.github.io/splitpanes
MIT License
1.91k stars 171 forks source link

Can't use watchSlots when pane contains a functional component (via vue-loader) #24

Closed Narretz closed 5 years ago

Narretz commented 5 years ago

splitpanes throws an error when I have a functional template:

[Vue warn]: Error in render: "TypeError: Converting circular structure to JSON"

found in

---> <Splitpanes> at splitpanes.vue
       <MyComp> at src/components/MyComp.vue

 TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at Proxy.render (webpack:///./node_modules/splitpanes/dist/splitpanes.common.js?:447)
    at VueComponent.Vue._render (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:3529)
    at VueComponent.updateComponent (webpack:///./node_modules/vue/dist/vue.runtime.esm.js?:4031)
<template functional>
  <div>
  </div>
</template>

That is compiled with vue-loader. It does not happen when I have a functional component with render function.

antoniandre commented 5 years ago

Hi @Narretz, Can you please provide more code as I can't reproduce? A codepen or codesandbox would be most helpful.

ChuckFields commented 5 years ago

I'm experiencing a similar issue. I'm not using vue-loader or functional. I've reproduced it here: https://codesandbox.io/s/xpp9k24o34

antoniandre commented 5 years ago

Thank you for your feedbacks. Please continue discussion and watch changes in #47.