diff --git a/lerna.json b/lerna.json index 3b1bf49547..a530305314 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.7.9", + "version": "2.7.11", "npmClient": "yarn", "packages": [ "packages/backend-core", diff --git a/packages/backend-core/src/db/lucene.ts b/packages/backend-core/src/db/lucene.ts index 4660be81aa..d501bb2166 100644 --- a/packages/backend-core/src/db/lucene.ts +++ b/packages/backend-core/src/db/lucene.ts @@ -343,6 +343,9 @@ export class QueryBuilder { } const oneOf = (key: string, value: any) => { + if (!value) { + return `*:*` + } if (!Array.isArray(value)) { if (typeof value === "string") { value = value.split(",") diff --git a/packages/backend-core/src/db/tests/lucene.spec.ts b/packages/backend-core/src/db/tests/lucene.spec.ts index b4791a86e0..a82828d8f2 100644 --- a/packages/backend-core/src/db/tests/lucene.spec.ts +++ b/packages/backend-core/src/db/tests/lucene.spec.ts @@ -114,6 +114,25 @@ describe("lucene", () => { expect(resp.rows.length).toBe(2) }) + it("should return all rows when doing a one of search against falsey value", async () => { + const builder = new QueryBuilder(dbName, INDEX_NAME) + builder.addOneOf("property", null) + let resp = await builder.run() + expect(resp.rows.length).toBe(3) + + builder.addOneOf("property", undefined) + resp = await builder.run() + expect(resp.rows.length).toBe(3) + + builder.addOneOf("property", "") + resp = await builder.run() + expect(resp.rows.length).toBe(3) + + builder.addOneOf("property", []) + resp = await builder.run() + expect(resp.rows.length).toBe(0) + }) + it("should be able to perform a contains search", async () => { const builder = new QueryBuilder(dbName, INDEX_NAME) builder.addContains("property", ["word"]) diff --git a/packages/bbui/src/Table/Table.svelte b/packages/bbui/src/Table/Table.svelte index 5bb4ed4523..f8528aac36 100644 --- a/packages/bbui/src/Table/Table.svelte +++ b/packages/bbui/src/Table/Table.svelte @@ -204,6 +204,12 @@ }) return columns .sort((a, b) => { + if (a.divider) { + return a + } + if (b.divider) { + return b + } const orderA = a.order || Number.MAX_SAFE_INTEGER const orderB = b.order || Number.MAX_SAFE_INTEGER const nameA = getDisplayName(a) diff --git a/packages/frontend-core/src/components/grid/layout/NewRow.svelte b/packages/frontend-core/src/components/grid/layout/NewRow.svelte index 85b430f79b..40e43c2ed9 100644 --- a/packages/frontend-core/src/components/grid/layout/NewRow.svelte +++ b/packages/frontend-core/src/components/grid/layout/NewRow.svelte @@ -148,9 +148,9 @@ class:floating={offset > 0} style="--offset:{offset}px; --sticky-width:{width}px;" > -
-
-
+
+
+
{#if isAdding} @@ -179,7 +179,7 @@ {/if}
-
+
{#each $renderedColumns as column, columnIdx} @@ -209,7 +209,7 @@
-
+