Updated auto focus option while disabled
This commit is contained in:
@@ -299,9 +299,10 @@ class ProductionQuantityResource extends Resource
|
|||||||
->required()
|
->required()
|
||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
// ->rules(['regex:/^[1-9][0-9]{6,}$/'])
|
// ->rules(['regex:/^[1-9][0-9]{6,}$/'])
|
||||||
->disabled(function ($get) {
|
// ->disabled(function ($get) {
|
||||||
return $get('item_code');
|
// return $get('item_code');
|
||||||
})
|
// })
|
||||||
|
// ->readOnly(fn (callable $get) => $get('item_code'))
|
||||||
->default(function () {
|
->default(function () {
|
||||||
// $latestProductionOrder = ProductionQuantity::latest()->first()->production_order;
|
// $latestProductionOrder = ProductionQuantity::latest()->first()->production_order;
|
||||||
// return $latestProductionOrder ?? null;
|
// return $latestProductionOrder ?? null;
|
||||||
@@ -325,9 +326,10 @@ class ProductionQuantityResource extends Resource
|
|||||||
->columnSpan(2)
|
->columnSpan(2)
|
||||||
->autofocus(true)
|
->autofocus(true)
|
||||||
->debounce(100)
|
->debounce(100)
|
||||||
->disabled(function ($get) {
|
// ->disabled(function ($get) {
|
||||||
return !$get('production_order');
|
// return !$get('production_order');
|
||||||
})
|
// })
|
||||||
|
|
||||||
// ->submitOnEnter()
|
// ->submitOnEnter()
|
||||||
->afterStateUpdated(function ($state, callable $get, callable $set) {
|
->afterStateUpdated(function ($state, callable $get, callable $set) {
|
||||||
$set('success_msg', null);
|
$set('success_msg', null);
|
||||||
|
|||||||
Reference in New Issue
Block a user