From 27dc59ff224b778bf6de3be3c68327fbdcbff898 Mon Sep 17 00:00:00 2001 From: Dom Date: Thu, 8 Aug 2024 14:50:24 +0200 Subject: [PATCH] disable item pane when selecting attachments, notes, et c. --- src/cita/zoteroOverlay.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/cita/zoteroOverlay.tsx b/src/cita/zoteroOverlay.tsx index 6f163b5..3425627 100644 --- a/src/cita/zoteroOverlay.tsx +++ b/src/cita/zoteroOverlay.tsx @@ -592,7 +592,10 @@ class ZoteroOverlay { body.firstChild! as Element, ); }, - onRender: ({ body, item, editable, tabType }) => { + onRender: ({ body, item }) => { + if (!item.isRegularItem()) { + return; + } const tab_id: string = body.parentElement?.parentElement?.parentElement ?.parentElement?.parentElement?.parentElement?.id!; @@ -608,6 +611,9 @@ class ZoteroOverlay { />, ); }, + onItemChange: ({ item, setEnabled }) => { + setEnabled(item.isRegularItem()); + }, }); }