From e39182ba9196bb2f72abf1404c995ef2e190a8b9 Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Fri, 20 Jun 2025 08:37:35 -0500 Subject: [PATCH] fix: defaults episode count to '-' as an indicator to whether the fetch call has run or not. if there are 0 results after the fetch call, the '-' is updated to '0' --- assets/controllers/tv_results_controller.js | 1 + templates/components/TvEpisodeList.html.twig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/controllers/tv_results_controller.js b/assets/controllers/tv_results_controller.js index c45c87d..9e76ece 100644 --- a/assets/controllers/tv_results_controller.js +++ b/assets/controllers/tv_results_controller.js @@ -48,6 +48,7 @@ export default class extends Controller { this.options.forEach((option) => option.querySelector('.download-btn').dataset['title'] = this.titleValue); this.options[0].querySelector('input[type="checkbox"]').checked = true; } else { + this.countTarget.innerText = 0; this.episodeSelectorTarget.disabled = true; } this.loadingIconOutlet.increaseCount(); diff --git a/templates/components/TvEpisodeList.html.twig b/templates/components/TvEpisodeList.html.twig index f2d6731..c408dc3 100644 --- a/templates/components/TvEpisodeList.html.twig +++ b/templates/components/TvEpisodeList.html.twig @@ -33,7 +33,7 @@