I have created a form using <v-combobox>
for autocompletion, which is working correctly. However, I am encountering an issue where the form submits the ID from the options array instead of the selected value. Despite setting the item-value="key"
to match the item-text="key"
, the submitted value is incorrect.
<v-flex
v-for="key in inputsNames"
v-if="key !== 'id'"
:key="key"
xs12
>
<v-combobox
v-model="editForm[key]"
:item-text="key"
:label="key"
:loading="loading"
:search-input.sync="inputSearch[key]"
:items="searchOptions"
:item-value="key"
cache-items
clearable
prepend-icon="filter_list"
/>
</v-flex>
For example:
When filling the x, y
fields with autocomplete and manually inputting others, it results in an error message:
**Array to string conversion (SQL: insert into table
(w
, x
, y
, z
) values (test, 5, 4, 1)) **
In this scenario, 5, 4,
should be two separate strings.
UPDATE:
The issue persists, but I have discovered that the entire item object is being sent to the POST method.