File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Expand file tree Collapse file tree 1 file changed +22
-6
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' );
392
+ if (serverSide && ! sendModel ) {
393
+ throw new Error (' Server-side configuration is missing' );
394
+ } else {
395
+ sendModel .q = searchValue ;
396
+ }
393
397
394
- sendModel .q = searchValue ;
395
398
$filterValue = searchValue ;
396
399
}}
397
400
>
407
410
id =" {tableId }-searchReset"
408
411
class =" absolute right-3 items-center"
409
412
on:click |preventDefault ={() => {
410
- if (! sendModel ) throw new Error (' Server-side configuration is missing' );
413
+ if (serverSide && ! sendModel ) {
414
+ throw new Error (' Server-side configuration is missing' );
415
+ } else {
416
+ sendModel .q = ' ' ;
417
+ }
411
418
412
419
searchValue = ' ' ;
413
- sendModel .q = ' ' ;
414
420
$filterValue = ' ' ;
415
421
}}><Fa icon ={faXmark } /></button
416
422
>
420
426
id =" {tableId }-searchSubmit"
421
427
class =" btn variant-filled-primary"
422
428
on:click |preventDefault ={() => {
423
- if (! sendModel ) throw new Error (' Server-side configuration is missing' );
429
+ if (serverSide && ! sendModel ) {
430
+ throw new Error (' Server-side configuration is missing' );
431
+ } else {
432
+ sendModel .q = searchValue ;
433
+ }
424
434
425
435
$filterValue = searchValue ;
426
- sendModel .q = searchValue ;
427
436
}}>Search</button
428
437
>
429
438
</form >
564
573
{/each }
565
574
</tbody >
566
575
</table >
576
+ {#if $pageRows .length === 0 }
577
+ <div
578
+ class =" p-8 flex items-center justify-center bg-tertiary-500/30 dark:bg-tertiary-900/10"
579
+ >
580
+ No rows available
581
+ </div >
582
+ {/if }
567
583
</div >
568
584
</div >
569
585
{:else }
You can’t perform that action at this time.
0 commit comments