Skip to content

Commit

Permalink
fix(years-modal-button): Ajouter une valeur par défaut pour l'année u…
Browse files Browse the repository at this point in the history
…niversitaire et corriger l'affichage des options non disponibles - erreur console
  • Loading branch information
jerem1508 committed Jan 14, 2025
1 parent 6c80315 commit 9339eeb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ export default function YearsModalButton() {
searchParams.set('annee_universitaire', e.target.value);
window.location.search = searchParams.toString();
}}
defaultValue={currentYear}
>
{
filtersValues.annees_universitaires.all.map((value: string) => (
<option
disabled={!filtersValues?.annees_universitaires?.onlyWithData.includes(value)}
key={value}
selected={searchParams.get('annee_universitaire') === value ? true : false}
value={value}
>
{`Années universitaire ${value}`}
{
!filtersValues?.annees_universitaires?.onlyWithData.includes(value) && (
<span> (- non disponibles -)</span>
<> (- non disponibles -)</>
)
}
</option>
Expand Down

0 comments on commit 9339eeb

Please sign in to comment.