diff --git a/lerna.json b/lerna.json index 3ab56dc0b1..480b577bb4 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.15.2", + "version": "2.15.4", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/packages/client/src/components/app/forms/RelationshipField.svelte b/packages/client/src/components/app/forms/RelationshipField.svelte index fcdc93020e..af48183c20 100644 --- a/packages/client/src/components/app/forms/RelationshipField.svelte +++ b/packages/client/src/components/app/forms/RelationshipField.svelte @@ -108,8 +108,16 @@ } } + $: forceFetchRows(filter) $: debouncedFetchRows(searchTerm, primaryDisplay, defaultValue) + const forceFetchRows = async () => { + // if the filter has changed, then we need to reset the options, clear the selection, and re-fetch + optionsObj = {} + fieldApi.setValue([]) + selectedValue = [] + debouncedFetchRows(searchTerm, primaryDisplay, defaultValue) + } const fetchRows = async (searchTerm, primaryDisplay, defaultVal) => { const allRowsFetched = $fetch.loaded && diff --git a/packages/server/src/utilities/workerRequests.ts b/packages/server/src/utilities/workerRequests.ts index 56ceff226c..1604a724d2 100644 --- a/packages/server/src/utilities/workerRequests.ts +++ b/packages/server/src/utilities/workerRequests.ts @@ -48,6 +48,9 @@ async function checkResponse( let error try { error = await response.json() + if (!error.message) { + error = JSON.stringify(error) + } } catch (err) { error = await response.text() }