diff --git a/web/components/issues/issue-layouts/spreadsheet/roots/project-root.tsx b/web/components/issues/issue-layouts/spreadsheet/roots/project-root.tsx index f049914df..a14a8d803 100644 --- a/web/components/issues/issue-layouts/spreadsheet/roots/project-root.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/roots/project-root.tsx @@ -41,6 +41,18 @@ export const ProjectSpreadsheetLayout: React.FC = observer(() => { [issueFilterStore, projectId, workspaceSlug] ); + const handleIssueAction = async (issue: IIssue, action: "copy" | "delete" | "edit") => { + if (!workspaceSlug || !projectId || !user) return; + + if (action === "delete") { + issueDetailStore.deleteIssue(workspaceSlug.toString(), projectId.toString(), issue.id); + issueStore.removeIssueFromStructure(null, null, issue); + } else if (action === "edit") { + issueDetailStore.updateIssue(workspaceSlug.toString(), projectId.toString(), issue.id, issue); + issueStore.updateIssueStructure(null, null, issue); + } + }; + const handleUpdateIssue = useCallback( (issue: IIssue, data: Partial) => { if (!workspaceSlug || !projectId || !user) return; @@ -65,7 +77,7 @@ export const ProjectSpreadsheetLayout: React.FC = observer(() => { members={projectMembers?.map((m) => m.member)} labels={projectLabels || undefined} states={projectId ? projectStateStore.states?.[projectId.toString()] : undefined} - handleIssueAction={() => {}} + handleIssueAction={handleIssueAction} handleUpdateIssue={handleUpdateIssue} disableUserActions={false} enableQuickCreateIssue diff --git a/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx b/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx index 20fcba939..c258d5437 100644 --- a/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/spreadsheet-view.tsx @@ -46,8 +46,6 @@ export const SpreadsheetView: React.FC = observer((props) => { issueId: string; } | null>(null); - const [isInlineCreateIssueFormOpen, setIsInlineCreateIssueFormOpen] = useState(false); - const [isScrolled, setIsScrolled] = useState(false); const containerRef = useRef(null);