Make sure file settings are updated properly when removing items

This commit is contained in:
Samuel Elliott 2018-06-23 22:59:13 +01:00
parent 7cf40a9ee4
commit 4d2347cf84
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
1 changed files with 3 additions and 3 deletions

View File

@ -20,8 +20,8 @@
<!-- Maybe add a preview here later? -->
<!-- For now just show the selected file path -->
<span class="bd-file-path">{{ file_path }}</span>
<span class="bd-file-open" @click="() => openItem(file_path)"><MiOpenInNew /></span>
<span class="bd-file-remove" :class="{'bd-disabled': setting.disabled}" @click="() => removeItem(file_path)"><MiMinus /></span>
<span class="bd-file-open" @click="openItem(file_path)"><MiOpenInNew /></span>
<span class="bd-file-remove" :class="{'bd-disabled': setting.disabled}" @click="removeItem(file_path)"><MiMinus /></span>
</div>
</div>
</div>
@ -51,7 +51,7 @@
},
removeItem(file_path) {
if (this.setting.disabled) return;
Utils.removeFromArray(this.setting.value, file_path);
this.setting.value = Utils.removeFromArray(this.setting.value, file_path);
}
}
}