File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 352
352
<!-- Enable the search filter if table is not empty -->
353
353
{#if $data .length > 0 }
354
354
{#if ! serverSide }
355
- <div class =" flex gap-2" >
355
+ <form
356
+ class =" flex gap-2"
357
+ on:submit |preventDefault ={() => {
358
+ sendModel .q = searchValue ;
359
+ $filterValue = searchValue ;
360
+ }}
361
+ >
356
362
<div class =" relative w-full flex items-center" >
357
363
<input
358
364
class =" input p-2 border border-primary-500"
365
371
class =" absolute right-3 items-center"
366
372
on:click |preventDefault ={() => {
367
373
searchValue = ' ' ;
374
+ sendModel .q = ' ' ;
368
375
$filterValue = ' ' ;
369
376
}}><Fa icon ={faXmark } /></button
370
377
>
371
378
</div >
372
379
<button
373
- type =" button "
380
+ type =" submit "
374
381
class =" btn variant-filled-primary"
375
382
on:click |preventDefault ={() => {
376
383
$filterValue = searchValue ;
384
+ sendModel .q = searchValue ;
377
385
}}>Search</button
378
386
>
379
- </div >
387
+ </form >
380
388
{/if }
381
389
<div class =" flex justify-between items-center py-2 w-full" >
382
390
<div >
You can’t perform that action at this time.
0 commit comments