From ff5e8e380275788d8fb39c45721fe4e24fa7a442 Mon Sep 17 00:00:00 2001 From: Dominic Date: Sun, 11 Jan 2026 06:18:28 +0100 Subject: [PATCH] feat(InputWithSelect): add dirty tracking styling and enhance input handling --- .../forms/input-with-select.blade.php | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/resources/views/components/forms/input-with-select.blade.php b/resources/views/components/forms/input-with-select.blade.php index d9f72143f..5a9e10d4b 100644 --- a/resources/views/components/forms/input-with-select.blade.php +++ b/resources/views/components/forms/input-with-select.blade.php @@ -3,6 +3,16 @@ $selectId = $htmlId !== 'null' ? $htmlId . '-select' : null; @endphp + +
+
+ {{-- Hidden input for wire:dirty tracking (binds to combinedValue which has the full value with unit) --}} + @if ($modelBinding !== 'null') + + @endif + {{-- Input --}} { parseCombinedValue(combined) { // Parse combinedValue (e.g., "512m") into structured format // Only matches if suffix is a valid unit to avoid footguns - if (!combined || combined === '0') { + if (!combined || combined === '0' || combined === 'null' || combined === null) { return { value: '', unit: config.defaultUnit }; }