From 5d21b9fadd52a55f8a1ccc0c62dfdfc1b027e51b Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 11 Jan 2026 05:50:12 +0100 Subject: [PATCH] refactor(InputWithSelect): remove manual clamp of minmax --- .../components/forms/input-with-select.blade.php | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/resources/views/components/forms/input-with-select.blade.php b/resources/views/components/forms/input-with-select.blade.php index 944ce6047..d9f72143f 100644 --- a/resources/views/components/forms/input-with-select.blade.php +++ b/resources/views/components/forms/input-with-select.blade.php @@ -156,16 +156,6 @@ document.addEventListener('alpine:init', () => { return { value: combined, unit: config.defaultUnit }; }, - validateAndClamp() { - const numValue = parseFloat(this.inputValue); - if (isNaN(numValue)) return; - if (config.min !== null && numValue < config.min) { - this.inputValue = String(config.min); - } else if (config.max !== null && numValue > config.max) { - this.inputValue = String(config.max); - } - }, - toStructured() { return { value: this.inputValue || '', @@ -183,14 +173,11 @@ document.addEventListener('alpine:init', () => { }, updateStructured() { - this.validateAndClamp(); this.structuredValue = this.toStructured(); this.updateCombined(); }, handleInputChange() { - this.validateAndClamp(); - if (this.pendingSync) { clearTimeout(this.pendingSync); }