File tree Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Expand file tree Collapse file tree 1 file changed +17
-7
lines changed Original file line number Diff line number Diff line change 389
389
<form
390
390
class =" flex gap-2"
391
391
on:submit |preventDefault ={() => {
392
- if (! sendModel ) throw new Error (' Server-side configuration is missing' );
393
-
394
- sendModel .q = searchValue ;
392
+ if (serverSide && ! sendModel ) {
393
+ throw new Error (' Server-side configuration is missing' );
394
+ } else {
395
+ sendModel .q = searchValue ;
396
+ }
395
397
$filterValue = searchValue ;
396
398
}}
397
399
>
407
409
id =" {tableId }-searchReset"
408
410
class =" absolute right-3 items-center"
409
411
on:click |preventDefault ={() => {
410
- if (! sendModel ) throw new Error (' Server-side configuration is missing' );
412
+ if (serverSide && ! sendModel ) {
413
+ throw new Error (' Server-side configuration is missing' );
414
+ } else {
415
+ sendModel .q = ' ' ;
416
+ }
417
+
418
+ $filterValue = searchValue ;
411
419
412
420
searchValue = ' ' ;
413
- sendModel .q = ' ' ;
414
421
$filterValue = ' ' ;
415
422
}}><Fa icon ={faXmark } /></button
416
423
>
420
427
id =" {tableId }-searchSubmit"
421
428
class =" btn variant-filled-primary"
422
429
on:click |preventDefault ={() => {
423
- if (! sendModel ) throw new Error (' Server-side configuration is missing' );
430
+ if (serverSide && ! sendModel ) {
431
+ throw new Error (' Server-side configuration is missing' );
432
+ } else {
433
+ sendModel .q = searchValue ;
434
+ }
424
435
425
436
$filterValue = searchValue ;
426
- sendModel .q = searchValue ;
427
437
}}>Search</button
428
438
>
429
439
</form >
You can’t perform that action at this time.
0 commit comments