Skip to content

Commit f606a4c

Browse files
fix: enable scroll in table columns configs popup
1 parent 71148c1 commit f606a4c

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ const OptionItem = (props: {
153153
popoverTitle?: string;
154154
draggable?: boolean;
155155
optionExtra?: React.ReactNode;
156+
scrollable?: boolean;
156157
}) => {
157-
const { content, config, title, popoverTitle, draggable = true, optionExtra } = props;
158+
const { content, config, title, popoverTitle, draggable = true, optionExtra, scrollable } = props;
158159
const [visible, setVisible] = useState(false);
159160
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
160161
id: config.dataIndex,
@@ -182,6 +183,7 @@ const OptionItem = (props: {
182183
setVisible={(vis) => {
183184
setVisible(vis);
184185
}}
186+
scrollable={scrollable}
185187
>
186188
{optionRow}
187189
</SimplePopover>
@@ -204,6 +206,7 @@ function Option<T extends ConstructorToComp<MultiCompConstructor>>(props: {
204206
optionToolbar?: React.ReactNode;
205207
headerItem?: React.ReactNode;
206208
itemExtra?: (comp: T) => React.ReactNode;
209+
scrollable?: boolean;
207210
}) {
208211
const { items, uniqVal, headerItem, optionToolbar, itemExtra } = props;
209212
const itemsDistinctValCount = uniqVal
@@ -286,6 +289,7 @@ function Option<T extends ConstructorToComp<MultiCompConstructor>>(props: {
286289
title={props.itemTitle(item)}
287290
config={{ dataIndex: dataIndex }}
288291
optionExtra={optionExtra}
292+
scrollable={props.scrollable}
289293
/>
290294
);
291295
})}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ const SimplePopover = (props: {
5151
setVisible?: (vis: boolean) => void;
5252
children: JSX.Element | React.ReactNode;
5353
content: JSX.Element | React.ReactNode;
54+
scrollable?: boolean;
5455
}) => {
5556
const { visible, setVisible } = props;
5657
const contentWithBox = (
5758
<SuspensionBox
5859
title={props.title}
5960
onClose={() => setVisible?.(false)}
6061
content={props.content}
62+
scrollable={props.scrollable}
6163
/>
6264
);
6365
return (
@@ -66,7 +68,7 @@ const SimplePopover = (props: {
6668
align={{
6769
offset: [-12, 0, 0, 0],
6870
}}
69-
destroyTooltipOnHide
71+
// destroyTooltipOnHide
7072
content={contentWithBox}
7173
trigger="click"
7274
open={visible}

client/packages/lowcoder/src/comps/comps/tableComp/tablePropertyView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ function ColumnPropertyView<T extends MultiBaseComp<TableChildrenType>>(props: {
390390
comp.children.columns.dispatch(action);
391391
}}
392392
dataIndex={(column) => column.getView().dataIndex}
393+
scrollable={true}
393394
/>
394395
</>
395396
);

0 commit comments

Comments
 (0)