瀏覽代碼

feat(ui): increase maximum tree width from 230px to 500px (#923)

Signed-off-by: ryjiang <jiangruiyi@gmail.com>
ryjiang 3 月之前
父節點
當前提交
331f904475
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      client/src/pages/databases/Databases.tsx

+ 2 - 1
client/src/pages/databases/Databases.tsx

@@ -14,6 +14,7 @@ import { styled } from '@mui/material/styles';
 import { Box } from '@mui/material';
 
 const DEFAULT_TREE_WIDTH = 230;
+const MAX_TREE_WIDTH = 500; // Maximum width the tree can be dragged to
 
 const PageWrapper = styled(Box)(({ theme }) => ({
   display: 'flex',
@@ -102,7 +103,7 @@ const Databases = () => {
         let mouseX = e.clientX - treeRef.current!.offsetLeft;
 
         // set min and max width
-        treeWidth = Math.max(1, Math.min(mouseX, DEFAULT_TREE_WIDTH));
+        treeWidth = Math.max(1, Math.min(mouseX, MAX_TREE_WIDTH));
 
         // set tree width
         setUIPref({ tree: { width: treeWidth } });