Skip to content

Commit 264b2f0

Browse files
added delay for queries trigger on page load
1 parent f58bffd commit 264b2f0

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

client/packages/lowcoder-design/src/components/ScrollBar.tsx

+13-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import styled from "styled-components";
55
import { DebouncedFunc } from 'lodash'; // Assuming you're using lodash's DebouncedFunc type
66

77

8-
const ScrollBarWrapper = styled.div<{ hidePlaceholder?: boolean }>`
8+
const ScrollBarWrapper = styled.div<{ $hideplaceholder?: boolean }>`
99
min-height: 0;
1010
height: 100%;
1111
width: 100%;
@@ -37,7 +37,7 @@ const ScrollBarWrapper = styled.div<{ hidePlaceholder?: boolean }>`
3737
bottom: 10px;
3838
}
3939
40-
${props => props.hidePlaceholder && `
40+
${props => Boolean(props.$hideplaceholder) && `
4141
.simplebar-placeholder {
4242
display: none !important;
4343
}
@@ -54,11 +54,20 @@ interface IProps {
5454
scrollableNodeProps?: {
5555
onScroll: DebouncedFunc<(e: any) => void>;
5656
};
57-
hidePlaceholder?: boolean;
57+
$hideplaceholder?: boolean;
5858
hideScrollbar?: boolean;
5959
}
6060

61-
export const ScrollBar = ({ height = "100%", className, children, style, scrollableNodeProps, hideScrollbar = false, ...otherProps }: IProps) => {
61+
export const ScrollBar = ({
62+
height = "100%",
63+
className,
64+
children,
65+
style,
66+
scrollableNodeProps,
67+
hideScrollbar = false,
68+
$hideplaceholder = false,
69+
...otherProps
70+
}: IProps) => {
6271
// You can now use the style prop directly or pass it to SimpleBar
6372
const combinedStyle = { ...style, height }; // Example of combining height with passed style
6473

client/packages/lowcoder-design/src/components/Section.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const BaseSection = (props: ISectionConfig<ReactNode>) => {
106106
const { compName, state, toggle } = useContext(PropertySectionContext);
107107
const open = props.open !== undefined ? props.open : name ? state[compName]?.[name] !== false : true;
108108

109-
console.log("open", open, props.open);
109+
// console.log("open", open, props.open);
110110

111111
const handleToggle = () => {
112112
if (!name) {

client/packages/lowcoder/src/comps/comps/moduleContainerComp/moduleLayoutComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export class ModuleLayoutComp extends ModuleLayoutCompBase implements IContainer
116116
const rowCount = this.children.containerRowCount.getView();
117117
return (
118118
<div>
119-
<ScrollBar style={{ height: "100%", margin: "0px", padding: "0px" }} hidePlaceholder={false}>
119+
<ScrollBar style={{ height: "100%", margin: "0px", padding: "0px" }} $hideplaceholder={false}>
120120
<ModuleLayoutView
121121
positionParams={this.children.positionParams.getView()}
122122
containerSize={this.children.containerSize.getView()}

client/packages/lowcoder/src/comps/queries/queryComp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ function QueryView(props: QueryViewProps) {
282282
) {
283283
setTimeout(() => {
284284
comp.dispatch(deferAction(executeQueryAction({})));
285-
});
285+
}, 100);
286286
}
287287
}, []);
288288

0 commit comments

Comments
 (0)