We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71f2f13 commit c374d5bCopy full SHA for c374d5b
frontend/src/components/widgets/inputs/NumberInput.vue
@@ -268,7 +268,11 @@ export default defineComponent({
268
return;
269
}
270
271
- const sanitized = clamp(newValue, this.min, this.max);
+ // We cannot use the clamp function here as we need undifined values to lead to no clamp.
272
+
273
+ let sanitized = newValue;
274
+ if (typeof this.min === "number") sanitized = Math.max(sanitized, this.min);
275
+ if (typeof this.max === "number") sanitized = Math.min(sanitized, this.max);
276
277
this.setText(sanitized);
278
},
0 commit comments