diff --git a/parenscript/admin.lisp b/parenscript/admin.lisp index bbf5ab5..ff8f01c 100644 --- a/parenscript/admin.lisp +++ b/parenscript/admin.lisp @@ -1159,14 +1159,17 @@ (setf (ps:@ status-el inner-h-t-m-l) "🟡 Disabled")))) - ;; Update available playlists dropdown + ;; Update available playlists dropdown (preserve current selection) (let ((playlist-select (ps:chain document (get-element-by-id "schedule-playlist"))) (available (ps:@ data available_playlists))) (when (and playlist-select available) - (let ((html "")) + (let ((current-value (ps:@ playlist-select value)) + (html "")) (ps:chain available (for-each (lambda (p) - (setf html (+ html ""))))) + (setf html (+ html ""))))) (setf (ps:@ playlist-select inner-h-t-m-l) html)))) ;; Update schedule table with edit/delete buttons