From b2dc356aed764001ea7272560ad201c609ff97de Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Fri, 25 Apr 2025 09:22:28 +0530 Subject: [PATCH] Updated auto focus option while disabled --- .../Resources/ProductionQuantityResource.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Filament/Resources/ProductionQuantityResource.php b/app/Filament/Resources/ProductionQuantityResource.php index 9f83b0f18..d6f0be40f 100644 --- a/app/Filament/Resources/ProductionQuantityResource.php +++ b/app/Filament/Resources/ProductionQuantityResource.php @@ -299,9 +299,10 @@ class ProductionQuantityResource extends Resource ->required() ->columnSpan(2) // ->rules(['regex:/^[1-9][0-9]{6,}$/']) - ->disabled(function ($get) { - return $get('item_code'); - }) + // ->disabled(function ($get) { + // return $get('item_code'); + // }) + // ->readOnly(fn (callable $get) => $get('item_code')) ->default(function () { // $latestProductionOrder = ProductionQuantity::latest()->first()->production_order; // return $latestProductionOrder ?? null; @@ -325,9 +326,10 @@ class ProductionQuantityResource extends Resource ->columnSpan(2) ->autofocus(true) ->debounce(100) - ->disabled(function ($get) { - return !$get('production_order'); - }) + // ->disabled(function ($get) { + // return !$get('production_order'); + // }) + // ->submitOnEnter() ->afterStateUpdated(function ($state, callable $get, callable $set) { $set('success_msg', null);