Final PR comment.

This commit is contained in:
mike12345567 2023-10-13 13:05:07 +01:00
parent c5360e1dcb
commit f64800f9f4
1 changed files with 1 additions and 3 deletions

View File

@ -25,7 +25,6 @@
let tableDefinition let tableDefinition
let searchTerm let searchTerm
let open let open
let hasFetchedDefaultValue
$: type = $: type =
datasourceType === "table" ? FieldTypes.LINK : FieldTypes.BB_REFERENCE datasourceType === "table" ? FieldTypes.LINK : FieldTypes.BB_REFERENCE
@ -117,11 +116,10 @@
if (allRowsFetched || !primaryDisplay) { if (allRowsFetched || !primaryDisplay) {
return return
} }
if (defaultVal && !hasFetchedDefaultValue) { if (defaultVal && !optionsObj[defaultVal]) {
await fetch.update({ await fetch.update({
query: { equal: { _id: defaultVal } }, query: { equal: { _id: defaultVal } },
}) })
hasFetchedDefaultValue = true
} }
await fetch.update({ await fetch.update({
query: { string: { [primaryDisplay]: searchTerm } }, query: { string: { [primaryDisplay]: searchTerm } },