the option menu stays rendered even if the minimal value is not picked after selecting it. i can check the checkbox and reduce the value, the checkbox dessapiers but the option menu still shows.
<div>
{total >= installmentLimits[0].minimum && (
<Checkbox
id="installments"
onChange={(e) => toggleInstallments(e.target.checked)}
>
Meses sin intereses
</Checkbox>
)}
</div>
{installments && (
<Select
defaultValue={installmentLimits[0].months}
onChange={(value) => setInstallmentValue(value)}
>
{installmentLimits.map((i) => {
if (total >= i.minimum) {
return <Option value={i.months}>{i.months} meses</Option>;
}
})}
</Select>
)}
{installments && (
<Typography.Text code>
Se cobrará una comisión adicional del{" "}
{installmentLimits.find((e) => e.months === installmentValue)
.additionalFee * 100}{" "}
%
</Typography.Text>
)}