Skip to content

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

Add ability to sort companies

François Zaninottoed5a8c48d85a
diff --git a/src/companies/CompanyList.tsx b/src/companies/CompanyList.tsx
index 0c795dd1..9e4a32b2 100644
--- a/src/companies/CompanyList.tsx
+++ b/src/companies/CompanyList.tsx
@@ -8,6 +8,7 @@ import {
Title,
ListToolbar,
useListContext,
+ SortButton,
} from 'react-admin';
import { ImageList } from './GridList';
@@ -48,6 +49,7 @@ const CompanyListLayout = () => {
const CompanyListActions = () => {
return (
<TopToolbar>
+ <SortButton fields={['name', 'created_at', 'nb_contacts']} />
<ExportButton />
<CreateButton
variant="contained"