From 1ea4928b3ff705d372f81c579bcf0c3092d24ead Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Wed, 8 Apr 2026 10:39:33 +0530 Subject: [PATCH] Issue solved in quality validation resource page for automatic submit --- .../Resources/QualityValidationResource.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/app/Filament/Resources/QualityValidationResource.php b/app/Filament/Resources/QualityValidationResource.php index b50d2e9..99a8937 100644 --- a/app/Filament/Resources/QualityValidationResource.php +++ b/app/Filament/Resources/QualityValidationResource.php @@ -584,13 +584,18 @@ class QualityValidationResource extends Resource }) ->extraAttributes(fn ($get) => [ 'class' => $get('validationError') ? 'border-red-500' : '', + 'id' => 'item_id', + 'onkeydown' => "if (event.key === 'Enter') { event.preventDefault(); event.stopPropagation(); return false; }", ]) - ->extraAttributes([ - 'onkeydown' => "if (event.key === 'Enter') { event.preventDefault(); return false; }", - ]) - ->extraAttributes([ - 'id' => 'item_id' - ]) + // ->extraAttributes(fn ($get) => [ + // 'class' => $get('validationError') ? 'border-red-500' : '', + // ]) + // ->extraAttributes([ + // 'onkeydown' => "if (event.key == 'Enter') { event.preventDefault(); return false; }", + // ]) + // ->extraAttributes([ + // 'id' => 'item_id' + // ]) ->hint(fn ($get) => $get('validationError') ? $get('validationError') : null) ->hintColor('danger'),