@bexis2/bexis2-core-ui 0.4.16 → 0.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # bexis-core-ui
2
+ ## 0.4.18
3
+ - Updates indicator text for current page and possible number of pages in a Table
4
+ - Fixes client-side search on Table
5
+ - Adds "No rows available" text in Table if search or filter returns no rows.
2
6
 
7
+ ## 0.4.17
8
+ - Table
9
+ - Fix client-side search
3
10
  ## 0.4.16
4
11
  - Facets
5
12
  - Replaces groups array with a writable store to re-render component on data manipulation.
@@ -321,9 +321,11 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
321
321
  <form
322
322
  class="flex gap-2"
323
323
  on:submit|preventDefault={() => {
324
- if (!sendModel) throw new Error('Server-side configuration is missing');
325
-
326
- sendModel.q = searchValue;
324
+ if (serverSide && !sendModel) {
325
+ throw new Error('Server-side configuration is missing');
326
+ } else {
327
+ sendModel.q = searchValue;
328
+ }
327
329
  $filterValue = searchValue;
328
330
  }}
329
331
  >
@@ -339,10 +341,15 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
339
341
  id="{tableId}-searchReset"
340
342
  class="absolute right-3 items-center"
341
343
  on:click|preventDefault={() => {
342
- if (!sendModel) throw new Error('Server-side configuration is missing');
344
+ if (serverSide && !sendModel) {
345
+ throw new Error('Server-side configuration is missing');
346
+ } else {
347
+ sendModel.q = '';
348
+ }
349
+
350
+ $filterValue = searchValue;
343
351
 
344
352
  searchValue = '';
345
- sendModel.q = '';
346
353
  $filterValue = '';
347
354
  }}><Fa icon={faXmark} /></button
348
355
  >
@@ -352,10 +359,13 @@ $: $hiddenColumnIds = shownColumns.filter((col) => !col.visible).map((col) => co
352
359
  id="{tableId}-searchSubmit"
353
360
  class="btn variant-filled-primary"
354
361
  on:click|preventDefault={() => {
355
- if (!sendModel) throw new Error('Server-side configuration is missing');
362
+ if (serverSide && !sendModel) {
363
+ throw new Error('Server-side configuration is missing');
364
+ } else {
365
+ sendModel.q = searchValue;
366
+ }
356
367
 
357
368
  $filterValue = searchValue;
358
- sendModel.q = searchValue;
359
369
  }}>Search</button
360
370
  >
361
371
  </form>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bexis2/bexis2-core-ui",
3
- "version": "0.4.16",
3
+ "version": "0.4.18",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -389,9 +389,11 @@
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,10 +409,15 @@
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,10 +427,13 @@
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>