Skip to content

Editor fixes #569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: enable scroll in table columns configs popup
  • Loading branch information
raheeliftikhar5 committed Dec 7, 2023
commit f606a4ca0b67415b769c2416c5a754c915c47c53
6 changes: 5 additions & 1 deletion client/packages/lowcoder-design/src/components/option.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ const OptionItem = (props: {
popoverTitle?: string;
draggable?: boolean;
optionExtra?: React.ReactNode;
scrollable?: boolean;
}) => {
const { content, config, title, popoverTitle, draggable = true, optionExtra } = props;
const { content, config, title, popoverTitle, draggable = true, optionExtra, scrollable } = props;
const [visible, setVisible] = useState(false);
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
id: config.dataIndex,
Expand Down Expand Up @@ -182,6 +183,7 @@ const OptionItem = (props: {
setVisible={(vis) => {
setVisible(vis);
}}
scrollable={scrollable}
>
{optionRow}
</SimplePopover>
Expand All @@ -204,6 +206,7 @@ function Option<T extends ConstructorToComp<MultiCompConstructor>>(props: {
optionToolbar?: React.ReactNode;
headerItem?: React.ReactNode;
itemExtra?: (comp: T) => React.ReactNode;
scrollable?: boolean;
}) {
const { items, uniqVal, headerItem, optionToolbar, itemExtra } = props;
const itemsDistinctValCount = uniqVal
Expand Down Expand Up @@ -286,6 +289,7 @@ function Option<T extends ConstructorToComp<MultiCompConstructor>>(props: {
title={props.itemTitle(item)}
config={{ dataIndex: dataIndex }}
optionExtra={optionExtra}
scrollable={props.scrollable}
/>
);
})}
Expand Down
4 changes: 3 additions & 1 deletion client/packages/lowcoder-design/src/components/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ const SimplePopover = (props: {
setVisible?: (vis: boolean) => void;
children: JSX.Element | React.ReactNode;
content: JSX.Element | React.ReactNode;
scrollable?: boolean;
}) => {
const { visible, setVisible } = props;
const contentWithBox = (
<SuspensionBox
title={props.title}
onClose={() => setVisible?.(false)}
content={props.content}
scrollable={props.scrollable}
/>
);
return (
Expand All @@ -66,7 +68,7 @@ const SimplePopover = (props: {
align={{
offset: [-12, 0, 0, 0],
}}
destroyTooltipOnHide
// destroyTooltipOnHide
content={contentWithBox}
trigger="click"
open={visible}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ function ColumnPropertyView<T extends MultiBaseComp<TableChildrenType>>(props: {
comp.children.columns.dispatch(action);
}}
dataIndex={(column) => column.getView().dataIndex}
scrollable={true}
/>
</>
);
Expand Down