seed keywords

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-29 23:30:22 +00:00
parent 0100db62c0
commit d2f3f3ef97
7 changed files with 830 additions and 539 deletions

View File

@@ -133,6 +133,15 @@ interface TablePageTemplateProps {
onRowAction?: (actionKey: string, row: any) => Promise<void>;
getItemDisplayName?: (row: any) => string; // Function to get display name from row (e.g., row.keyword or row.name)
className?: string;
// Custom actions to display in action buttons area (near column selector)
customActions?: ReactNode;
// Custom bulk actions configuration (overrides table-actions.config.ts)
bulkActions?: Array<{
key: string;
label: string;
icon?: ReactNode;
variant?: 'primary' | 'success' | 'danger';
}>;
}
export default function TablePageTemplate({
@@ -167,6 +176,8 @@ export default function TablePageTemplate({
onExport,
getItemDisplayName = (row: any) => row.name || row.keyword || row.title || String(row.id),
className = '',
customActions,
bulkActions: customBulkActions,
}: TablePageTemplateProps) {
const location = useLocation();
const [isBulkActionsDropdownOpen, setIsBulkActionsDropdownOpen] = useState(false);
@@ -181,7 +192,8 @@ export default function TablePageTemplate({
// Get actions from config (edit/delete always included)
const rowActions = tableActionsConfig?.rowActions || [];
const bulkActions = tableActionsConfig?.bulkActions || [];
// Use custom bulk actions if provided, otherwise use config
const bulkActions = customBulkActions || tableActionsConfig?.bulkActions || [];
// Selection and expanded rows state
const [selectedIds, setSelectedIds] = useState<string[]>(selection?.selectedIds || []);
@@ -737,6 +749,9 @@ export default function TablePageTemplate({
{/* Action Buttons - Right aligned */}
<div className="flex gap-2 items-center">
{/* Custom Actions */}
{customActions}
{/* Column Selector */}
<ColumnSelector
columns={columns.map(col => ({