Merge branch 'master' into budi-7680/data-section-add-search-to-data-sources

This commit is contained in:
Adria Navarro 2023-11-23 11:06:22 +01:00 committed by GitHub
commit da4e7fccf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -426,7 +426,7 @@ describe.each([
const saved = (await loadRow(id, table._id!)).body
expect(saved.stringUndefined).toBe(undefined)
expect(saved.stringNull).toBe("")
expect(saved.stringNull).toBe(null)
expect(saved.stringString).toBe("i am a string")
expect(saved.numberEmptyString).toBe(null)
expect(saved.numberNull).toBe(null)

View File

@ -46,23 +46,23 @@ export const TYPE_TRANSFORM_MAP: any = {
parse: parseArrayString,
},
[FieldTypes.STRING]: {
"": "",
[null]: "",
"": null,
[null]: null,
[undefined]: undefined,
},
[FieldTypes.BARCODEQR]: {
"": "",
[null]: "",
"": null,
[null]: null,
[undefined]: undefined,
},
[FieldTypes.FORMULA]: {
"": "",
[null]: "",
"": null,
[null]: null,
[undefined]: undefined,
},
[FieldTypes.LONGFORM]: {
"": "",
[null]: "",
"": null,
[null]: null,
[undefined]: undefined,
},
[FieldTypes.NUMBER]: {
@ -71,6 +71,11 @@ export const TYPE_TRANSFORM_MAP: any = {
[undefined]: undefined,
parse: n => parseFloat(n),
},
[FieldTypes.BIGINT]: {
"": null,
[null]: null,
[undefined]: undefined,
},
[FieldTypes.DATETIME]: {
"": null,
[undefined]: undefined,