Skip to content

Commit 5cadfc3

Browse files
author
FalkWolsky
committed
Update Scrollbars
1 parent 144ca9f commit 5cadfc3

File tree

5 files changed

+8
-37
lines changed

5 files changed

+8
-37
lines changed

client/packages/lowcoder/src/comps/comps/allComp.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Object.keys(QueryMap).forEach((key) => {
7272

7373
function logDiff(comp: any, newComp: any, prefix?: string) {
7474
if (_.isNil(comp.children)) {
75-
console.info(`diff. comp.${prefix}: `, comp, ` newComp.${prefix}: `, newComp);
75+
// console.info(`diff. comp.${prefix}: `, comp, ` newComp.${prefix}: `, newComp);
7676
return;
7777
}
7878
Object.keys(comp.children).forEach((key) => {

client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,17 +215,11 @@ export function ListView(props: Props) {
215215
<BackgroundColorContext.Provider value={style.background}>
216216
<ListViewWrapper $style={style} $paddingWidth={paddingWidth}>
217217
<BodyWrapper ref={ref} $autoHeight={autoHeight}>
218-
{scrollbars ? (
219-
<ScrollBar style={{ height: autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }}>
220-
<>{<ReactResizeDetector onResize={(width?: number, height?: number) => { if (height) setListHeight(height); }} observerOptions={{ box: "border-box" }} >
221-
<div style={{ height: autoHeight ? "auto" : "100%" }}>{renders}</div>
222-
</ReactResizeDetector>}</>
223-
</ScrollBar>
224-
) : (
218+
<ScrollBar style={{ height: autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={scrollbars}>
225219
<>{<ReactResizeDetector onResize={(width?: number, height?: number) => { if (height) setListHeight(height); }} observerOptions={{ box: "border-box" }} >
226220
<div style={{ height: autoHeight ? "auto" : "100%" }}>{renders}</div>
227221
</ReactResizeDetector>}</>
228-
)}
222+
</ScrollBar>
229223
</BodyWrapper>
230224
<FooterWrapper>
231225
<Pagination size="small" itemRender={pageItemRender} {...pageInfo.pagination} />

client/packages/lowcoder/src/comps/comps/triContainerComp/triContainer.tsx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ export function TriContainer(props: TriContainerProps) {
147147
)}
148148
{showBody && (
149149
<BackgroundColorContext.Provider value={bodyStyle.background}>
150-
{scrollbars ? (
151-
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }}>
150+
<ScrollBar style={{ height: container.autoHeight ? "auto" : "100%", margin: "0px", padding: "0px" }} hideScrollbar={scrollbars}>
152151
<BodyInnerGrid
153152
$showBorder={showHeader}
154153
{...otherBodyProps}
@@ -171,28 +170,6 @@ export function TriContainer(props: TriContainerProps) {
171170
style={{padding: bodyStyle.containerBodyPadding}}
172171
/>
173172
</ScrollBar>
174-
) : (
175-
<BodyInnerGrid
176-
$showBorder={showHeader}
177-
{...otherBodyProps}
178-
items={gridItemCompToGridItems(bodyItems)}
179-
autoHeight={container.autoHeight}
180-
emptyRows={14}
181-
minHeight={showHeader ? "143px" : "142px"}
182-
containerPadding={
183-
(showHeader && showFooter) || showHeader ? [paddingWidth, 11.5] : [paddingWidth, 11]
184-
}
185-
hintPlaceholder={props.hintPlaceholder ?? HintPlaceHolder}
186-
$backgroundColor={bodyStyle?.background || 'transparent'}
187-
$borderColor={style?.border}
188-
$borderWidth={style?.borderWidth}
189-
$backgroundImage={bodyStyle?.backgroundImage}
190-
$backgroundImageRepeat={bodyStyle?.backgroundImageRepeat}
191-
$backgroundImageSize={bodyStyle?.backgroundImageSize}
192-
$backgroundImagePosition={bodyStyle?.backgroundImagePosition}
193-
$backgroundImageOrigin={bodyStyle?.backgroundImageOrigin}
194-
style={{padding: bodyStyle.containerBodyPadding}}/>
195-
)}
196173
</BackgroundColorContext.Provider>
197174
)}
198175
{showFooter && (

client/packages/lowcoder/src/comps/hooks/agoraFunctions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ const useAgora = () => {
4343
const leaveChannel = async () => {
4444
if (isJoined) {
4545
if (!client) {
46-
console.error("Agora client is not initialized");
46+
// console.error("Agora client is not initialized");
4747
return;
4848
}
4949

5050
if (!client.localTracks.length) {
51-
console.error("No local tracks to unpublish");
51+
// console.error("No local tracks to unpublish");
5252
return;
5353
}
5454

@@ -105,7 +105,7 @@ const useAgora = () => {
105105
setHeight(videoHeight!);
106106
// console.log(`Video width: ${videoWidth}px, height: ${videoHeight}px`);
107107
} else {
108-
console.error("Media stream track not found");
108+
// console.error("Media stream track not found");
109109
}
110110
};
111111

client/packages/lowcoder/src/util/perfUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function showCost<T>(logstr: string, fn: () => T): T {
9595
}
9696
const startTime = performance.now();
9797
const result = fn();
98-
console.info(`${logstr} cost: ${performance.now() - startTime}`);
98+
// console.info(`${logstr} cost: ${performance.now() - startTime}`);
9999
return result;
100100
}
101101

0 commit comments

Comments
 (0)