test-utils icon indicating copy to clipboard operation
test-utils copied to clipboard

Bug: setValue on nested v-model do not correctly update parent

Open tharvik opened this issue 1 year ago • 0 comments

Describe the bug with nested v-model components, updating the child doesn't propagate changes to the parents, only the direct one.

To Reproduce I setup a PR with a test triggering it. the normal vue behavior can be testing in this playground

Expected behavior in nested v-model, if the child changes, it should update all it's depending parents, as vue does.

Related information: it look like that setValue replace the ref of a model by the value directly. it should update the ref instead.

Additional context I was able to workaround it by replacing in my test stack

comp.setValue("value");

by

comp.vm.modelValue.value = "value";

EDIT: workaround is not working for deeper hierarchy

tharvik avatar Jul 09 '24 12:07 tharvik