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 389389 <form
390390 class =" flex gap-2"
391391 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+ }
393397
394- sendModel .q = searchValue ;
395398 $filterValue = searchValue ;
396399 }}
397400 >
407410 id =" {tableId }-searchReset"
408411 class =" absolute right-3 items-center"
409412 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+ }
411418
412419 searchValue = ' ' ;
413- sendModel .q = ' ' ;
414420 $filterValue = ' ' ;
415421 }}><Fa icon ={faXmark } /></button
416422 >
420426 id =" {tableId }-searchSubmit"
421427 class =" btn variant-filled-primary"
422428 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+ }
424434
425435 $filterValue = searchValue ;
426- sendModel .q = searchValue ;
427436 }}>Search</button
428437 >
429438 </form >
564573 {/each }
565574 </tbody >
566575 </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 }
567583 </div >
568584 </div >
569585 {:else }
You can’t perform that action at this time.
0 commit comments