fix(filters): display the right value when resetting the filter options (#1695)

* fix(filters): display the right value when resetting the filter options

When clearing the filters everything is reset but the sort option still display the previous value,
while the content has now the default value.

fix #1693

* fix: remove console.log
This commit is contained in:
Gauthier
2025-06-04 11:15:09 +02:00
committed by GitHub
parent 6b8c0bd8f3
commit c0dd2e5e27
2 changed files with 2 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ const DiscoverMovies = () => {
id="sortBy"
name="sortBy"
className="rounded-r-only"
value={preparedFilters.sortBy}
value={preparedFilters.sortBy || SortOptions.PopularityDesc}
onChange={(e) => updateQueryParams('sortBy', e.target.value)}
>
<option value={SortOptions.PopularityDesc}>

View File

@@ -83,7 +83,7 @@ const DiscoverTv = () => {
id="sortBy"
name="sortBy"
className="rounded-r-only"
value={preparedFilters.sortBy}
value={preparedFilters.sortBy || SortOptions.PopularityDesc}
onChange={(e) => updateQueryParams('sortBy', e.target.value)}
>
<option value={SortOptions.PopularityDesc}>