wx-svelte-grid 2.1.0 → 2.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wx-svelte-grid",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "A powerful and flexible DataGrid component written in Svelte",
5
5
  "productTag": "grid",
6
6
  "productTrial": false,
@@ -37,9 +37,9 @@
37
37
  "wx-lib-svelte": "0.5.1",
38
38
  "wx-svelte-menu": "2.1.0",
39
39
  "wx-svelte-core": "2.1.0",
40
- "wx-grid-data-provider": "2.1.0",
41
- "wx-grid-locales": "2.1.0",
42
- "wx-grid-store": "2.1.0"
40
+ "wx-grid-data-provider": "2.1.1",
41
+ "wx-grid-locales": "2.1.1",
42
+ "wx-grid-store": "2.1.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "wx-svelte-editor": "2.1.0",
@@ -305,14 +305,13 @@
305
305
  }
306
306
  });
307
307
 
308
- // get visible rows
309
- let dataRows = $state([]);
310
- $effect(() => {
311
- if ($dynamic) dataRows = $data;
308
+ const dataRows = $derived.by(() => {
309
+ if ($dynamic) return $data;
312
310
  else {
313
- dataRows = $data.slice(renderRows.start, renderRows.end);
311
+ return $data.slice(renderRows.start, renderRows.end);
314
312
  }
315
313
  });
314
+
316
315
  //get visible selection
317
316
  const visibleSelection = $derived(
318
317
  $selectedRows.filter(s => dataRows.some(r => r.id === s))
@@ -713,7 +712,7 @@
713
712
  {cellStyle}
714
713
  {reorder}
715
714
  focusable={focus?.row === row.id &&
716
- focus?.column === column.id}
715
+ focus?.column == column.id}
717
716
  />
718
717
  {/if}
719
718
  {/each}
package/whatsnew.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.1.1
2
+
3
+ ### Fixes
4
+
5
+ - Data with empty fields is filtered out when filters are cleared
6
+ - Column sorting should use `getter` to get field value
7
+
1
8
  ## 2.1.0
2
9
 
3
10
  ### New features