row click & filters + ...

This commit is contained in:
hamid zarghami
2025-06-26 09:41:39 +03:30
parent 5af36bd77b
commit 1cd24fc3c5
6 changed files with 101 additions and 9 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ import Table from '../../components/Table';
import { ColumnType } from '../../components/types/TableTypes';
import { InfoCircle, More, Refresh2, Trash, Edit, Archive, ArchiveSlash } from 'iconsax-react';
import { RowActionItem } from '../../components/RowActionsDropdown';
import { useNavigate } from 'react-router-dom';
interface Message extends Record<string, unknown> {
id: string;
@@ -15,6 +16,7 @@ interface Message extends Record<string, unknown> {
}
const List: FC = () => {
const navigate = useNavigate();
const { t } = useTranslation();
const [isLoading] = useState(false);
const [selectedMessages, setSelectedMessages] = useState<Message[]>([]);
@@ -141,7 +143,7 @@ const List: FC = () => {
actions={tableActions}
selectedActions={selectedActions}
onSelectionChange={handleSelectionChange}
onRowClick={(id) => console.log(`کلیک روی پیام با شناسه ${id}`)}
onRowClick={(id) => navigate(`/mail/${id}`)}
noDataMessage={
<div className="flex flex-col items-center py-6">
<InfoCircle size={32} className="text-gray-300 mb-2" />