diff --git a/client/src/components/Settings.vue b/client/src/components/Settings.vue index 25d3c2b4..1e0e4a23 100644 --- a/client/src/components/Settings.vue +++ b/client/src/components/Settings.vue @@ -157,7 +157,7 @@ dense class='col-10' placeholder='Use , as separator' - @input='$1t.settings.quickTag.genres[i].subgenres = ($event||"").split(",")' + @input='onSubgenreInput($event, i)' :value='($1t.settings.quickTag.genres[i].subgenres||[]).join(",")' > @@ -382,6 +382,14 @@ export default { this.$1t.settings.quickTag.genres.push({genre: this.newGenre, keybind: null}); this.newGenre = null; }, + // On subgenres changed + onSubgenreInput(e, i) { + if (!e) { + this.$1t.settings.quickTag.genres[i].subgenres = []; + return; + } + this.$1t.settings.quickTag.genres[i].subgenres = e.split(","); + }, // Mood keybind setMoodKeybind(i, key) { this.$1t.settings.quickTag.moods[i].keybind = key;