Skip to content

Commit

Permalink
Without debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinheij committed Dec 4, 2024
1 parent 98690cd commit d33e2a1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Components/Filters/FilterInputText.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit d33e2a1

Please sign in to comment.