Skip to content

Commit

Permalink
[Fixed: bagisto#8800]
Browse files Browse the repository at this point in the history
  • Loading branch information
vivek-webkul committed Oct 26, 2023
1 parent 8fde247 commit 1538427
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ class="text-[14px] text-gray-600 dark:text-gray-300 font-semibold cursor-pointer
:list="optionsData"
item-key="id"
>
<template #item="{ element, index }" v-show="! element.isDelete">
<x-admin::table.thead.tr class="text-center hover:bg-gray-50 dark:hover:bg-gray-950">
<template #item="{ element, index }">
<x-admin::table.thead.tr class="text-center hover:bg-gray-50 dark:hover:bg-gray-950" v-show="! element.isDelete">
<input
type="hidden"
:name="'options[' + element.id + '][isNew]'"
Expand Down Expand Up @@ -1058,7 +1058,11 @@ class="primary-button"
let foundIndex = this.optionsData.findIndex(item => item.id === id);
if (foundIndex !== -1) {
this.optionsData.splice(foundIndex, 1);
if (this.optionsData[foundIndex].isNew) {
this.optionsData.splice(foundIndex, 1);
} else {
this.optionsData[foundIndex].isDelete = true;
}
}
},
Expand Down

0 comments on commit 1538427

Please sign in to comment.