I am new to vue.js. I write this for pencil
<i
class="mdi mdi-pencil"
@click.prevent="$bvModal.show(type.title)"
></i>
This for modal
<b-modal
:id="type.title"
ref="modal"
title="Update holiday"
centered
hide-footer
>
<FormModal
cardTitle="Update holiday"
description=""
:value="type.title"
action="update"
@formData="parseFormData"
:holidayTypeID="type.id"
></FormModal>
and this is the function
holidaysTypeUpdate(value, holidayID) {
this.$refs["modal"][0].hide();
session
.put(`api/holidays/holiday-type/${holidayID}/action/`, {
title: value,
})
.then(() => {
this.alertSchema = {
alertVariant: "success",
alertMsg: "Holiday updated",
show: true,
};
this.$bvModal.hide("type.title");
this.fetchHolidayTypes();
})
.catch((e) => {
console.log(e.response.data);
});
},
When I press the button the data updated but the modal don’t close. What can I do in order to close the modal when I update the data?