ditdot-dev / vue-flow-form

Create conversational conditional-logic forms with Vue.js.
https://www.ditdot.hr/en/vue-flow-form
MIT License
779 stars 174 forks source link

Mutating prop issue #214

Closed henrikruscon closed 2 years ago

henrikruscon commented 3 years ago

This line of code mutates prop

https://github.com/ditdot-dev/vue-flow-form/blob/93bad194fc77722b424383a5080e345f9d4aaf10/src/components/QuestionTypes/BaseType.vue#L137

spinn commented 3 years ago

Hi @henrikdahl,

thanks for the report. Can you provide a test case when this error happens? Or are you referring to the fact we are changing a property of QuestionModel (or a "prop" of the question component if you're defining questions with components; although take note we're actually using a copy of the prop value in this case)? This is inevitable and necessary with how Vue Flow Form is currently designed - it also changes many other properties of QuestionModel, but this is unavoidable (and completely expected) when using class instances.

phre1 commented 2 years ago

Closing - Inactive issue