From ecce75960aa7d08650e27a0904ab685f7f4c9b6f Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Mon, 25 Jan 2021 17:33:16 +0100 Subject: [PATCH] fix in open ref table --- packages/web/src/datagrid/ColumnHeaderControl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/web/src/datagrid/ColumnHeaderControl.js b/packages/web/src/datagrid/ColumnHeaderControl.js index e3f50c21..f0f12140 100644 --- a/packages/web/src/datagrid/ColumnHeaderControl.js +++ b/packages/web/src/datagrid/ColumnHeaderControl.js @@ -9,6 +9,7 @@ import { openDatabaseObjectDetail } from '../appobj/DatabaseObjectAppObject'; import { useSetOpenedTabs } from '../utility/globalState'; import { FontIcon } from '../icons'; import useTheme from '../theme/useTheme'; +import useOpenNewTab from '../utility/useOpenNewTab'; const HeaderDiv = styled.div` display: flex; @@ -52,11 +53,11 @@ export default function ColumnHeaderControl({ }) { const onResizeDown = useSplitterDrag('clientX', onResize); const { foreignKey } = column; - const setOpenedTabs = useSetOpenedTabs(); + const openNewTab = useOpenNewTab(); const theme = useTheme(); const openReferencedTable = () => { - openDatabaseObjectDetail(setOpenedTabs, 'TableDataTab', null, { + openDatabaseObjectDetail(openNewTab, 'TableDataTab', null, { schemaName: foreignKey.refSchemaName, pureName: foreignKey.refTableName, conid,