Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

evert: Keep tag fetch errors visible in contact list

erwanMarmelab122f31bd593d
diff --git a/src/components/atomic-crm/contacts/TagsList.tsx b/src/components/atomic-crm/contacts/TagsList.tsx
index 619dbb69..168989be 100644
--- a/src/components/atomic-crm/contacts/TagsList.tsx
+++ b/src/components/atomic-crm/contacts/TagsList.tsx
@@ -1,8 +1,5 @@
import { useRecordContext } from "ra-core";
-import {
- ReferenceArrayField,
- type ReferenceArrayFieldProps,
-} from "@/components/admin/reference-array-field";
+import { ReferenceArrayField } from "@/components/admin/reference-array-field";
import { SingleFieldList } from "@/components/admin/single-field-list";
import { Badge } from "@/components/ui/badge";
import { cn } from "@/lib/utils";
@@ -22,19 +19,12 @@ const ColoredBadge = (props: any) => {
);
};
-// Cached contacts may still reference a deleted tag: don't notify about it.
-// ra-core forwards onError to useGetManyAggregate, but its queryOptions type doesn't declare it.
-const silentQueryOptions = {
- onError: () => {},
-} as ReferenceArrayFieldProps["queryOptions"];
-
export const TagsList = () => (
<ReferenceArrayField
className="inline-block"
resource="contacts"
source="tags"
reference="tags"
- queryOptions={silentQueryOptions}
>
<SingleFieldList>
<ColoredBadge source="name" />