From bb9d401d7cc58dcfd04db9f16595359c7244df18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Boduro=C4=9Flu?= <80620802+burakboduroglu@users.noreply.github.com> Date: Tue, 28 Jul 2026 18:29:32 +0300 Subject: [PATCH] =?UTF-8?q?fix(ui):=20=F0=9F=90=9B=20defer=20dropdown=20ac?= =?UTF-8?q?tion=20to=20fix=20SidePanel=20outside-interaction=20close,=20tr?= =?UTF-8?q?im=20question=20text=20-=20wrap=20dropdown=20row=20action=20in?= =?UTF-8?q?=20setTimeout(0)=20so=20menu=20closes=20before=20panel=20opens?= =?UTF-8?q?=20-=20add=20max-w-[24rem]=20truncation=20on=20question=20text?= =?UTF-8?q?=20cell=20-=20remove=20table-fixed=20from=20question=20bank=20t?= =?UTF-8?q?able?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/table-row-actions.tsx | 6 +++++- src/pages/question-bank-page.tsx | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/ui/table-row-actions.tsx b/src/components/ui/table-row-actions.tsx index dcdb20a..1f81b0e 100644 --- a/src/components/ui/table-row-actions.tsx +++ b/src/components/ui/table-row-actions.tsx @@ -33,7 +33,11 @@ export function TableRowActions(props: { label: string; actions: TableRowAction[ class="flex h-10 items-center gap-2.5 rounded-xl px-3 text-xs font-medium" destructive={action.destructive} disabled={action.disabled} - onSelect={action.onSelect} + // Defer to the next macrotask so the menu fully closes (and + // restores focus to its trigger) before the action opens a + // panel/dialog — otherwise the non-modal SidePanel reads that + // focus-restore as an outside interaction and instantly closes. + onSelect={() => setTimeout(action.onSelect, 0)} > {action.icon} {action.label} diff --git a/src/pages/question-bank-page.tsx b/src/pages/question-bank-page.tsx index 17d67ad..e5b9436 100644 --- a/src/pages/question-bank-page.tsx +++ b/src/pages/question-bank-page.tsx @@ -108,7 +108,7 @@ function QuestionBankContent() { { accessorKey: "text", header: t("questions.text"), - cell: (cell) =>

{cell.row.original.text}

, + cell: (cell) =>

{cell.row.original.text}

, }, { accessorKey: "kind", @@ -233,7 +233,7 @@ function QuestionBankContent() { } columns={columns()} data={list()?.items ?? []} - tableClass="table-fixed min-w-6xl" + tableClass="min-w-6xl" filterPlaceholder={t("bank.search")} searchValue={query()} onSearchInput={(value) => {