Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e04061

Browse files
fixed table scrollbar issues
1 parent1a887bb commit0e04061

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

‎client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const BackgroundWrapper = styled.div<{
144144
$tableAutoHeight:boolean;
145145
$showHorizontalScrollbar:boolean;
146146
$showVerticalScrollbar:boolean;
147+
$fixedToolbar:boolean;
147148
}>`
148149
display: flex;
149150
flex-direction: column;
@@ -158,8 +159,15 @@ const BackgroundWrapper = styled.div<{
158159
overflow: hidden;
159160
160161
> div.table-scrollbar-wrapper {
161-
height: auto;
162162
overflow: auto;
163+
${(props)=>props.$fixedToolbar&&`height: auto`};
164+
165+
${(props)=>(props.$showHorizontalScrollbar||props.$showVerticalScrollbar)&&`
166+
.simplebar-content-wrapper {
167+
overflow: auto !important;
168+
}
169+
`}
170+
163171
${(props)=>!props.$showHorizontalScrollbar&&`
164172
div.simplebar-horizontal {
165173
visibility: hidden !important;
@@ -847,6 +855,7 @@ export function TableCompView(props: {
847855
return<EmptyContenttext={trans("table.emptyColumns")}/>;
848856
}
849857

858+
consthideScrollbar=!showHorizontalScrollbar&&!showVerticalScrollbar;
850859
return(
851860
<BackgroundColorContext.Providervalue={style.background}>
852861
<BackgroundWrapper
@@ -855,14 +864,15 @@ export function TableCompView(props: {
855864
$tableAutoHeight={tableAutoHeight}
856865
$showHorizontalScrollbar={showHorizontalScrollbar}
857866
$showVerticalScrollbar={showVerticalScrollbar}
867+
$fixedToolbar={toolbar.fixedToolbar}
858868
>
859-
{toolbar.position==="above"&&toolbar.fixedToolbar&&toolbarView}
869+
{toolbar.position==="above"&&(toolbar.fixedToolbar||(tableAutoHeight&&showHorizontalScrollbar))&&toolbarView}
860870
<ScrollBar
861871
className="table-scrollbar-wrapper"
862872
style={{height:"100%",margin:"0px",padding:"0px"}}
863-
hideScrollbar={!showHorizontalScrollbar&&!showVerticalScrollbar}
864-
prefixNode={toolbar.position==="above"&&!toolbar.fixedToolbar&&toolbarView}
865-
suffixNode={toolbar.position==="below"&&!toolbar.fixedToolbar&&toolbarView}
873+
hideScrollbar={hideScrollbar}
874+
prefixNode={toolbar.position==="above"&&!toolbar.fixedToolbar&&!(tableAutoHeight&&showHorizontalScrollbar)&&toolbarView}
875+
suffixNode={toolbar.position==="below"&&!toolbar.fixedToolbar&&!(tableAutoHeight&&showHorizontalScrollbar)&&toolbarView}
866876
>
867877
<TableWrapper
868878
$style={style}
@@ -926,7 +936,7 @@ export function TableCompView(props: {
926936
</SlotConfigContext.Provider>
927937
</TableWrapper>
928938
</ScrollBar>
929-
{toolbar.position==="below"&&toolbar.fixedToolbar&&toolbarView}
939+
{toolbar.position==="below"&&(toolbar.fixedToolbar||(tableAutoHeight&&showHorizontalScrollbar))&&toolbarView}
930940
</BackgroundWrapper>
931941

932942
</BackgroundColorContext.Provider>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp