koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
538 stars 154 forks source link

update select binding issue #379

Closed abumalekFayed closed 1 year ago

abumalekFayed commented 1 year ago

I have form include select with data source from context,the data source is array of object and i set x-itemTittle and x-itemKey to bind with key the problem appear when trying to update record and set the model with a specific key the select not work and no selection was happen.

albanm commented 1 year ago

Can you provide an example ? Maybe in the form of a codepen (you can use links in the doc to initialize a codepen).

abumalekFayed commented 1 year ago

https://codepen.io/gafbxjvt/pen/RwyyWOx when trying to edit an item from the list, binding to select id does not work however the model updated successfully

albanm commented 1 year ago

I think this another case of https://github.com/koumoul-dev/vuetify-jsonschema-form/issues/58

Vjsf does not work well with model changes from outside, you have to re-render.

abumalekFayed commented 1 year ago

Thank you the problem was solved by setting select type to a number instead of a string as binding id is a number thank you very much for your awesome work.