@@ -109,6 +112,7 @@ export default {
data() {
return {
playlists: [],
+ filteredPlaylists: [],
bookmarks: [],
playlistToDelete: null,
playlistToEdit: null,
@@ -127,7 +131,7 @@ export default {
methods: {
fetchPlaylists() {
this.getPlaylists().then(json => {
- this.playlists = json;
+ this.playlists = this.filteredPlaylists = json;
});
},
showPlaylistEditModal(playlist) {
@@ -160,6 +164,9 @@ export default {
});
this.playlistToDelete = null;
},
+ filterPlaylists(evt) {
+ this.filteredPlaylists = this.playlists.filter(playlist => playlist.name.includes(evt.target.value));
+ },
async exportPlaylists() {
if (!this.playlists) return;
let json = {