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 389389 <form
390390 class =" flex gap-2"
391391 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+ }
395397 $filterValue = searchValue ;
396398 }}
397399 >
407409 id =" {tableId }-searchReset"
408410 class =" absolute right-3 items-center"
409411 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 ;
411419
412420 searchValue = ' ' ;
413- sendModel .q = ' ' ;
414421 $filterValue = ' ' ;
415422 }}><Fa icon ={faXmark } /></button
416423 >
420427 id =" {tableId }-searchSubmit"
421428 class =" btn variant-filled-primary"
422429 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+ }
424435
425436 $filterValue = searchValue ;
426- sendModel .q = searchValue ;
427437 }}>Search</button
428438 >
429439 </form >
You can’t perform that action at this time.
0 commit comments