Skip to content

Commit 6f66684

Browse files
committed
scrollbar added
1 parent e8008cc commit 6f66684

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

client/packages/lowcoder/src/comps/comps/jsonComp/jsonEditorComp.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@ import { AutoHeightControl } from "@lowcoder-ee/index.sdk";
2727
* JsonEditor Comp
2828
*/
2929

30-
const Wrapper = styled.div<{$height:boolean}>`
30+
const Wrapper = styled.div<{$height: boolean}>`
3131
background-color: #fff;
3232
border: 1px solid #d7d9e0;
3333
border-radius: 4px;
34-
overflow: auto;
35-
height: ${props=>props.$height?'100%':'300px'};
34+
overflow: scroll;
35+
height: ${(props) => (props.$height ? '100%' : '300px')};
36+
&::-webkit-scrollbar {
37+
width: 16px;
38+
display:block !important;
39+
}
3640
`;
3741

3842
/**

client/packages/lowcoder/src/comps/comps/jsonComp/jsonExplorerComp.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,19 @@ const bgColorMap = {
4141
const JsonExplorerContainer = styled.div<{
4242
$theme: keyof typeof bgColorMap;
4343
$animationStyle: AnimationStyleType;
44-
$height: boolean
44+
$height: boolean;
4545
}>`
4646
${(props) => props.$animationStyle}
47-
height: ${props => props.$height ?'100%':'300px'};
47+
height: ${(props) => (props.$height ? '100%' : '300px')};
4848
overflow-y: scroll;
49-
background-color: ${(props) => bgColorMap[props.$theme] || "#ffffff"};
49+
background-color: ${(props) => bgColorMap[props.$theme] || '#ffffff'};
5050
border: 1px solid #d7d9e0;
5151
border-radius: 4px;
5252
padding: 10px;
53+
&::-webkit-scrollbar {
54+
width: 16px;
55+
display: block !important;
56+
}
5357
`;
5458

5559
let JsonExplorerTmpComp = (function () {

0 commit comments

Comments
 (0)