Skip to content

Commit

Permalink
Add "Delete All Tracks" button (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
satveerbrar authored Jan 1, 2022
1 parent de12e7a commit b41c056
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@

this.refresh();
},
deleteAllTracks(){
this.tracks = []
this.refresh();
},
insertTrack(trackId) {
for (let i = 0; i < this.tracks.length; i++) {
if (this.tracks[i].id === trackId) {
Expand Down Expand Up @@ -303,7 +307,11 @@
<th scope="col" width="100">#</th>
<th scope="col">Title</th>
<th scope="col" width="100">Time</th>
<th scope="col">&nbsp;</th>
<th scope="col" style="text-align: right">
<button type="button" class="btn btn-outline-danger btn-sm" @click="deleteAllTracks">
Delete All Tracks
</button>
</th>
</tr>
</thead>
<tbody>
Expand Down

0 comments on commit b41c056

Please sign in to comment.