diff --git a/src/lib/components/variables/VariableInput.svelte b/src/lib/components/variables/VariableInput.svelte index 9bf63c434b81947cd9474128f8c35fe1325b934f..4ee97dc2930cd885f92dcb27bff79e5b7d371673 100644 --- a/src/lib/components/variables/VariableInput.svelte +++ b/src/lib/components/variables/VariableInput.svelte @@ -370,18 +370,18 @@ year, )} {:else} + {@const value = getSituationVariableValue( + situation, + variable, + populationId, + year, + )} <!-- Input menu sélection --> - <select class="my-1 w-full rounded border-none bg-white p-1 pr-10 shadow-sm focus:border-le-bleu focus:text-le-bleu" onblur={(event) => changeValue(event, populationId)} onchange={(event) => changeValue(event, populationId)} - value={getSituationVariableValue( - situation, - variable, - populationId, - year, - )} + {value} > {#each Object.entries(variable.possible_values) as [symbol, label]} <option value={symbol}>{label}</option>