-
-
Notifications
You must be signed in to change notification settings - Fork 69
[Vue warn]: Error in nextTick: "RangeError: Maximum call stack size exceeded" #27
Comments
Hi @Monine 👋
In a meantime you can check the code of the demo |
Yes, I want to be in a specific container. |
Is there any progress? We can discuss it together. |
Hi @Monine It looks strange because there is nothing special about it. 🤔 Let's try to inline component from the repo to your codesandbox and use development version of vue so we have access to sourcemaps |
Think differently. |
After trying out different things I found out that See updated codesandbox here (check console): https://codesandbox.io/embed/vue-template-67q68 |
Having similar issue with usage of container option,
While my Vue instance is mounted to the same app div. |
Did further further investigation. This is happening due to watcher on vue-moveable/src/components/Moveable.vue Lines 67 to 78 in 8b118f3
When passed Simple repro available here: https://codesandbox.io/s/vue-template-20djs. Try clicking To fix this should avoid deep-watching for changes on |
This is cool. Without |
@probil, Yes, sure I will try and open a PR. What do you think about changing component's API from enumerating all This might be a better option as component will support all existing (and future possible) |
🤔 it may look like a good idea but it's not a Vue-way of doing things. And after that change there will be no point of having this component. I think we can do it in another way: const REACTIVE_PROPS = [
'bounds',
'dragArea',
'draggable',
// and all other, can be taken from `moveable` package.
];
const watchReactiveProp = key => function (newValue) {
const existingValue = this.moveable[key];
if (existingValue === newValue) return;
this.moveable[key] = newValue;
}
const passMulpleReactivePropsToMoveable = props => props.reduce((acc, prop) => {
acc[prop] = watchReactiveProp(prop);
return acc;
}, {})
export default {
watch: {
...passMulpleReactivePropsToMoveable(REACTIVE_PROPS),
}
}
I thought about that. It would be really nice to get rid of moveable from directdependenciess. Would you like to create a separate issue for that? |
Released as part of v1.0.0 |
e.g.
https://codesandbox.io/embed/vue-template-3wd0w
The key point is on the container property
Is my usage wrong?
The text was updated successfully, but these errors were encountered: