vue-form-generator icon indicating copy to clipboard operation
vue-form-generator copied to clipboard

Spectrum component getting reused

Open DelfsEngineering opened this issue 6 years ago • 4 comments

In a use case where there are several instances of VFG, I am seeing the spectrum element getting reused. An example would be an accordion where you have multiple instances of VFG for various contacts.

In this example you can see the name field is mapping correctly but the spectrum element does not and only the first myArray is getting updated. I have tried adding a unique id key but I suspect Vue needs a unique key property set. https://jsfiddle.net/s8vqmw0L/2/

DelfsEngineering avatar Jul 22 '19 11:07 DelfsEngineering

This also appears to be the case with the rangeSlider element too. @zoul0813 @icebob Any thoughts on this?

DelfsEngineering avatar Aug 20 '19 12:08 DelfsEngineering

@delfsengineering sorry, I haven’t really touched the project in months. Started a new job and haven’t used Vue or VFG for it (yet).

higginsd-la avatar Aug 20 '19 12:08 higginsd-la

in spectrum case, schema object modified by first spectrum field instance, onchange function added to schema object, and second field instance use the first instance's onchange callback. DO NOT USE SAME SCHEMA OBJECT !

JianChuanting avatar Jul 09 '20 03:07 JianChuanting

in spectrum case, schema object modified by first spectrum field instance, onchange function added to schema object, and second field instance use the first instance's onchange callback. DO NOT USE SAME SCHEMA OBJECT !

JianChuanting avatar Jul 09 '20 03:07 JianChuanting