Skip to content

Commit

Permalink
Make sure we mark playlist/items as dirty when item is removed (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbevp authored May 21, 2024
1 parent c77a78c commit 7003e63
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/PlaylistForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
icon
text
class="ma-2 red--text"
@click="() => newPlaylist.item_ids.splice(index, 1)"
@click="() => removeItem(index)"
>
<VIcon>mdi-close</VIcon>
</VBtn>
Expand Down Expand Up @@ -213,6 +213,11 @@ export default {
this.newPlaylist.playlist_type = this.playlist.playlist_type;
this.newPlaylist.item_ids = [...this.playlist.item_ids];
},
removeItem(index) {
this.isDirty = true;
this.itemsDirty = true;
this.newPlaylist.item_ids.splice(index, 1);
},
async submit() {
let pendingResult = null;
if (this.playlist) {
Expand Down

0 comments on commit 7003e63

Please sign in to comment.