fix: allow free-form quantity input for ml/g sub-units (no step constraint)

This commit is contained in:
dadaloop82
2026-05-05 05:19:51 +00:00
parent 1e8c299052
commit fc47cd8c27
+4 -4
View File
@@ -6774,16 +6774,16 @@ function switchUseUnit(mode) {
_useConfMode._activeUnit = 'sub';
const step = getSubUnitStep(_useConfMode.packageUnit);
qtyInput.value = step;
qtyInput.step = step;
qtyInput.min = step;
qtyInput.step = 'any';
qtyInput.min = 1;
hint.textContent = t('recipes.quantity_in_total', { unit: _useConfMode.subLabel, total: `${Math.round(_useConfMode.totalSub)}${_useConfMode.subLabel}` });
} else {
confBtn.classList.add('active');
subBtn.classList.remove('active');
_useConfMode._activeUnit = 'conf';
qtyInput.value = 1;
qtyInput.step = 0.5;
qtyInput.min = 0.5;
qtyInput.step = 'any';
qtyInput.min = 0.1;
hint.textContent = t('recipes.packs_of_have', { size: `${_useConfMode.packageSize}${_useConfMode.subLabel}`, count: _useConfMode.totalConf.toFixed(1) });
}
}