jeudi 19 septembre 2019

el-select from Element Ui not adding or removing items?

I'm using the el-select to add tags and sizes to a product with a form, when I add a new product it works no problem, but when I try to edit an existing product I can't delete or add any tags or sizes? What could be causing this problem?

<el-form-item label="Etiquetas de Relación" class="fix-select">
    <el-select v-model="form.tags" multiple placeholder="Seleccionar" >
        <el-option
            v-for="item in tags"
            :key="item.id"
            :label="item.name"
            :value="item.id">
        </el-option>
    </el-select>
</el-form-item>

<el-form-item label="Tallas" class="fix-select">
    <el-select v-model="form.sizes" multiple placeholder="Seleccionar Tallas Disponibles">
        <el-option
            v-for="item in sizes"
            :key="item.id"
            :label="item.name"
            :value="item.id">
        </el-option>
    </el-select>
</el-form-item>


I'm getting the tags and sizes from a table in the database, here I can only select the ones already created. The only way to delete or add is in the form if I change the brand I'm thinking because it reloads?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire