@teselagen/ui 0.8.6-beta.15 → 0.8.6-beta.16

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/index.cjs.js CHANGED
@@ -19693,7 +19693,7 @@ function applyWhereClause(records, where) {
19693
19693
  return false;
19694
19694
  }
19695
19695
  } else {
19696
- const value = record[key];
19696
+ const value = get$3(record, key);
19697
19697
  const conditions = filter2[key];
19698
19698
  if (isObject$2(value) && isObject$2(conditions) && !hasOperator(conditions)) {
19699
19699
  return applyFilter(value, conditions);
package/index.es.js CHANGED
@@ -19675,7 +19675,7 @@ function applyWhereClause(records, where) {
19675
19675
  return false;
19676
19676
  }
19677
19677
  } else {
19678
- const value = record[key];
19678
+ const value = get$3(record, key);
19679
19679
  const conditions = filter2[key];
19680
19680
  if (isObject$2(value) && isObject$2(conditions) && !hasOperator(conditions)) {
19681
19681
  return applyFilter(value, conditions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.8.6-beta.15",
3
+ "version": "0.8.6-beta.16",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -76,7 +76,7 @@ function applyWhereClause(records, where) {
76
76
  return false;
77
77
  }
78
78
  } else {
79
- const value = record[key];
79
+ const value = get(record, key);
80
80
  const conditions = filter[key];
81
81
 
82
82
  // Handle nested object properties
@@ -57,6 +57,14 @@ describe("filterLocalEntitiesToHasura", () => {
57
57
  expect(result.entitiesAcrossPages).toEqual([records[0]]);
58
58
  expect(result.entityCount).toBe(1);
59
59
  });
60
+ it("should filter num fields by _eq", () => {
61
+ const result = filterLocalEntitiesToHasura(records, {
62
+ where: { age: { _eq: 30 } }
63
+ });
64
+ expect(result.entities).toEqual([records[0]]);
65
+ expect(result.entitiesAcrossPages).toEqual([records[0]]);
66
+ expect(result.entityCount).toBe(1);
67
+ });
60
68
 
61
69
  it("should filter by _neq", () => {
62
70
  const result = filterLocalEntitiesToHasura(records, {