Merge pull request #15489 from Budibase/budi-9018-searching-budidb-column-headings-in-the-data-tab-breaks-grid

Fix searching for a date on a string field.
This commit is contained in:
Sam Rose 2025-02-05 14:20:38 +00:00 committed by GitHub
commit c89dfb36ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -388,7 +388,7 @@ class InternalBuilder {
}
}
if (typeof input === "string") {
if (typeof input === "string" && schema.type === FieldType.DATETIME) {
if (isInvalidISODateString(input)) {
return null
}

View File

@ -1040,6 +1040,12 @@ if (descriptions.length) {
string: { name: "FO" },
}).toContainExactly([{ name: "foo" }])
})
it("should not coerce string to date for string columns", async () => {
await expectQuery({
string: { name: "2020-01-01" },
}).toFindNothing()
})
})
describe("range", () => {