Spaces:
Runtime error
Runtime error
Update public/script.js
Browse files- public/script.js +2 -2
public/script.js
CHANGED
|
@@ -59,9 +59,9 @@ function updateNavigationVisibility(searchQuery, totalPages) {
|
|
| 59 |
|
| 60 |
// Call loadMusicList when the search input changes
|
| 61 |
document.getElementById('search-bar').addEventListener('keyup', debounce(() => {
|
| 62 |
-
currentPage = 1;
|
| 63 |
loadMusicList();
|
| 64 |
-
},
|
| 65 |
|
| 66 |
function loadMusicList() {
|
| 67 |
const searchQuery = document.getElementById('search-bar').value.toLowerCase();
|
|
|
|
| 59 |
|
| 60 |
// Call loadMusicList when the search input changes
|
| 61 |
document.getElementById('search-bar').addEventListener('keyup', debounce(() => {
|
| 62 |
+
currentPage = 1;
|
| 63 |
loadMusicList();
|
| 64 |
+
}, 500)); // Waits for 0.5s of inactivity after typing
|
| 65 |
|
| 66 |
function loadMusicList() {
|
| 67 |
const searchQuery = document.getElementById('search-bar').value.toLowerCase();
|