Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
fix(sidebar): opens sidepanel in case its closed and click on sidebar (#620)
Guy Ben-Aharon3faa39e7875d
diff --git a/src/pages/editor-page/editor-sidebar/editor-sidebar.tsx b/src/pages/editor-page/editor-sidebar/editor-sidebar.tsxindex 4e697f59..42b380af 100644--- a/src/pages/editor-page/editor-sidebar/editor-sidebar.tsx+++ b/src/pages/editor-page/editor-sidebar/editor-sidebar.tsx@@ -23,30 +23,40 @@ export interface SidebarItem {export interface EditorSidebarProps {}export const EditorSidebar: React.FC<EditorSidebarProps> = () => {- const { selectSidebarSection, selectedSidebarSection } = useLayout();+ const { selectSidebarSection, selectedSidebarSection, showSidePanel } =+ useLayout();const { t } = useTranslation();const items: SidebarItem[] = useMemo(() => [{title: t('side_panel.tables_section.tables'),icon: Table,- onClick: () => selectSidebarSection('tables'),+ onClick: () => {+ showSidePanel();+ selectSidebarSection('tables');+ },active: selectedSidebarSection === 'tables',},{title: t('side_panel.relationships_section.relationships'),icon: Workflow,- onClick: () => selectSidebarSection('relationships'),+ onClick: () => {+ showSidePanel();+ selectSidebarSection('relationships');+ },active: selectedSidebarSection === 'relationships',},{title: t('side_panel.dependencies_section.dependencies'),icon: SquareStack,- onClick: () => selectSidebarSection('dependencies'),+ onClick: () => {+ showSidePanel();+ selectSidebarSection('dependencies');+ },active: selectedSidebarSection === 'dependencies',},],- [selectSidebarSection, selectedSidebarSection, t]+ [selectSidebarSection, selectedSidebarSection, t, showSidePanel]);return (<Sidebar