From d33e2a108cb2206d031854ed3d6f389efa5b0b93 Mon Sep 17 00:00:00 2001
From: Edwin Heij <e.heij@konnectit.nl>
Date: Wed, 4 Dec 2024 23:19:56 +0100
Subject: [PATCH] Without debounce

---
 src/Components/Filters/FilterInputText.php | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/Components/Filters/FilterInputText.php b/src/Components/Filters/FilterInputText.php
index 65e1d9de..a29ddcb5 100644
--- a/src/Components/Filters/FilterInputText.php
+++ b/src/Components/Filters/FilterInputText.php
@@ -42,12 +42,14 @@ public static function getWireAttributes(string $field, string $title): array
     {
         return collect()
             ->put('selectAttributes', new ComponentAttributeBag([
-                'wire:model'                     => 'filters.input_text_options.' . $field,
-                'wire:input.live.debounce.600ms' => 'filterInputTextOptions(\'' . $field . '\', $event.target.value, \'' . $title . '\')',
+                'wire:model'         => 'filters.input_text_options.' . $field,
+                'wire:keydown.enter' => 'filterInputTextOptions(\'' . $field . '\', $event.target.value, \'' . $title . '\')',
+                'wire:keydown.tab'   => 'filterInputTextOptions(\'' . $field . '\', $event.target.value, \'' . $title . '\')',
             ]))
             ->put('inputAttributes', new ComponentAttributeBag([
-                'wire:model'                     => 'filters.input_text.' . $field,
-                'wire:input.live.debounce.600ms' => 'filterInputText(\'' . $field . '\', $event.target.value, \'' . $title . '\')',
+                'wire:model'         => 'filters.input_text.' . $field,
+                'wire:keydown.enter' => 'filterInputText(\'' . $field . '\', $event.target.value, \'' . $title . '\')',
+                'wire:keydown.tab'   => 'filterInputText(\'' . $field . '\', $event.target.value, \'' . $title . '\')',
             ]))
             ->toArray();
     }