diff --git a/src/components/schema-sidebar-list.tsx b/src/components/schema-sidebar-list.tsx index 55db0724..a773c8b0 100644 --- a/src/components/schema-sidebar-list.tsx +++ b/src/components/schema-sidebar-list.tsx @@ -69,6 +69,8 @@ export default function SchemaList({ search }: Readonly) { const prepareContextMenu = useCallback( (tableName?: string) => { + console.log(tableName); + return [ { title: "Copy Name", @@ -114,15 +116,24 @@ export default function SchemaList({ search }: Readonly) { return ( + openContextMenuFromEvent( + prepareContextMenu( + selectedIndex && schema[selectedIndex] + ? schema[selectedIndex].name + : undefined + ) + )(e) + } >
{filteredSchema.map((item, schemaIndex) => { return ( { + openContextMenuFromEvent(prepareContextMenu(item.name))(e); + e.stopPropagation(); + }} key={item.name} title={item.name} icon={Table2}