Skip to content

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

fix missing lable in filters list by introducing WrapperField component

ThieryMichel8d91337b9cb2
diff --git a/src/components/admin/wrapper-field.tsx b/src/components/admin/wrapper-field.tsx
new file mode 100644
index 00000000..c493485e
--- /dev/null
+++ b/src/components/admin/wrapper-field.tsx
@@ -0,0 +1,6 @@
+import { InputProps } from "ra-core";
+import { ReactNode } from "react";
+
+export const WrapperField = ({
+ children,
+}: InputProps & { children: ReactNode }) => children;
diff --git a/src/components/atomic-crm/deals/DealList.tsx b/src/components/atomic-crm/deals/DealList.tsx
index 6a8e5064..9a6e64a2 100644
--- a/src/components/atomic-crm/deals/DealList.tsx
+++ b/src/components/atomic-crm/deals/DealList.tsx
@@ -18,6 +18,7 @@ import { DealEmpty } from "./DealEmpty";
import { DealListContent } from "./DealListContent";
import { DealShow } from "./DealShow";
import { OnlyMineInput } from "./OnlyMineInput";
+import { WrapperField } from "@/components/admin/wrapper-field";
const DealList = () => {
const { identity } = useGetIdentity();
@@ -34,16 +35,23 @@ const DealList = () => {
placeholder={translate("crm.deals.filters.company", { _: "Company" })}
/>
</ReferenceInput>,
- <SelectInput
+ <WrapperField
source="category"
- label={false}
- emptyText={translate("resources.deals.fields.category", {
+ label={translate("resources.deals.fields.category", {
_: "Category",
})}
- choices={dealCategories}
- optionText="label"
- optionValue="value"
- />,
+ >
+ <SelectInput
+ source="category"
+ label={false}
+ emptyText={translate("resources.deals.fields.category", {
+ _: "Category",
+ })}
+ choices={dealCategories}
+ optionText="label"
+ optionValue="value"
+ />
+ </WrapperField>,
<OnlyMineInput source="sales_id" alwaysOn />,
];