Skip to content

Commit 8a56c37

Browse files
committed
fileViewer: fixing scrollbar funxtionality
1 parent c3f5b1c commit 8a56c37

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

client/packages/lowcoder/src/comps/comps/fileViewerComp.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,18 @@ const StyledDiv = styled.div<{$style: FileViewerStyleType;}>`
4242
${(props) => props.$style && getStyle(props.$style)}
4343
`;
4444

45-
const DraggableFileViewer = (props: { src: string; style: FileViewerStyleType,animationStyle:AnimationStyleType }) => {
45+
const DraggableFileViewer = (props: {
46+
src: string;
47+
style: FileViewerStyleType,
48+
animationStyle:AnimationStyleType,
49+
showVerticalScrollbar: boolean,
50+
}) => {
4651
const [isActive, setActive] = useState(false);
4752

4853
return (
4954
<StyledDiv
5055
$style={props.style}
56+
id="fileViewer"
5157
onClick={(e) => setActive(true)}
5258
onMouseLeave={(e) => setActive(false)}
5359
>
@@ -83,7 +89,12 @@ let FileViewerBasicComp = (function () {
8389
</ErrorWrapper>
8490
);
8591
}
86-
return <DraggableFileViewer src={props.src} style={props.style} animationStyle={props.animationStyle}/>;
92+
return <DraggableFileViewer
93+
src={props.src}
94+
style={props.style}
95+
animationStyle={props.animationStyle}
96+
showVerticalScrollbar={props.showVerticalScrollbar}
97+
/>;
8798
})
8899
.setPropertyViewFn((children) => {
89100
return (

0 commit comments

Comments
 (0)