You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On drop when copy is "on" a TypeError is thrown in case the source model contains cyclic references. (My model is a tree structure where the nodes have a "parent" reference.)
When vue-dragula builds the target model for the drop-model event it clones the source model by executing:
On drop when copy is "on" a
TypeError
is thrown in case the source model contains cyclic references. (My model is a tree structure where the nodes have a "parent" reference.)When vue-dragula builds the target model for the
drop-model
event it clones the source model by executing:The
TypeError
is thrown byJSON.stringify
. By defaultJSON.stringify
does not support cyclic references.A solution would be if vue-dragula would offer an option to let the user configure the "replacer function" (resp. the whitelist array) to be passed as the 2nd argument to
JSON.stringify
.https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
This way the user would get an opportunity to strip the problematic (= cyclic) model properties for stringification.
I'm using Vuejs 2 and vue-dragula 2.0.0-alpha.1 which worked fine until I added the cyclic model reference.
The text was updated successfully, but these errors were encountered: