File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ You can override any of these in your table component:
160
160
| Property | Default | Usage |
161
161
| -------- | ------- | ----- |
162
162
| $searchEnabled | true | Whether or not searching is enabled |
163
+ | $searchUpdateMethod | debounce | debounce or lazy |
163
164
| $searchDebounce | 350 | Amount of time in ms to wait to send the search query and refresh the table |
164
165
| $disableSearchOnLoading | true | Whether or not to disable the search bar when it is searching/loading new data |
165
166
| $search | * none* | The initial search string |
Original file line number Diff line number Diff line change 21
21
@if ($searchEnabled )
22
22
<div class =" col" >
23
23
<input
24
- @if (is_numeric ($searchDebounce ) ) wire:model.debounce.{{ $searchDebounce }}ms =" search" @endif
24
+ @if (is_numeric ($searchDebounce ) && $searchUpdateMethod === ' debounce' ) wire:model.debounce.{{ $searchDebounce }}ms =" search" @endif
25
+ @if ($searchUpdateMethod === ' lazy' ) wire:model.lazy =" search" @endif
25
26
@if ($disableSearchOnLoading ) wire:loading.attr =" disabled" @endif
26
27
class =" form-control"
27
28
type =" text"
Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ trait Search
11
11
* Search.
12
12
*/
13
13
14
+ /**
15
+ * Method to search by: debounce or lazy
16
+ * @var string
17
+ */
18
+ public $ searchUpdateMethod = 'debounce ' ;
19
+
14
20
/**
15
21
* Whether or not searching is enabled.
16
22
*
You can’t perform that action at this time.
0 commit comments