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
546 stars 155 forks source link

x-display: combobox not working with x-fromUrl #370

Closed ibot3 closed 1 month ago

ibot3 commented 2 years ago

On the docs website there is an example that shows how a combobox can be used with suggestions (examples) from HTTP. However, this doesn't seem to work. Even the example on the website behaves like a normal select from HTTP:

https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/examples/#combobox

"Anything that can be represented as a select can also be represented as a combobox to allow the user to enter extra values. "

Custom input values besides the ones from HTTP are not possible.

My Model:

...
subcategory: {
  'x-display': 'combobox',
  type: 'string',
  title: i18n.t('subcategory'),
  'x-itemKey': 'subcategory',
  'x-fromUrl': `${API_URL}/subcategory`,
},
...
albanm commented 2 years ago

This is fixed in the 2.18.2 release. But to be honest I think the user interaction is not very intuitive, this functionality needs more work. Right now I just fixed the regression.

ibot3 commented 2 years ago

Thank you! With bad user interaction you mean the strange behavior when adding text after the selected item and it then overwrites the selected item with the new text when loosing focus? However, I think this issue can be closed.