From 7b6afa1128ebcaffa75c973002764ad28b996b7f Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Wed, 5 Nov 2025 12:47:31 +0100 Subject: [PATCH] fix --- frontend/src/documents/DocumentInfoPanel.jsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/frontend/src/documents/DocumentInfoPanel.jsx b/frontend/src/documents/DocumentInfoPanel.jsx index 9b5bdc7..f1dc4f1 100644 --- a/frontend/src/documents/DocumentInfoPanel.jsx +++ b/frontend/src/documents/DocumentInfoPanel.jsx @@ -219,6 +219,20 @@ const DocumentInfoPanel = ({ return visibleTabs[0].id; }, [visibleTabs, defaultTabId]); + const renderTabContent = (tab, context = {}) => { + if (!tab) { + return null; + } + if (typeof tab.render === 'function') { + return tab.render(context); + } + if (tab.component) { + const TabComponent = tab.component; + return ; + } + return React.isValidElement(tab.render) ? tab.render : null; + }; + const isControlled = controlledActiveTab !== undefined && controlledActiveTab !== null; const [uncontrolledTab, setUncontrolledTab] = useState( isControlled ? controlledActiveTab : fallbackTabId,