Skip to content

Antd Upgrade #307

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 14 commits into from
Jul 28, 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: fixed popover and collapse
  • Loading branch information
raheeliftikhar5 committed Jul 26, 2023
commit 501e00d37b7c3902518c81e5b3cbd980b9f7b6f5
23 changes: 9 additions & 14 deletions client/packages/lowcoder-design/src/components/Collapase.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Collapse as AntdCollapse } from "antd";
import { Collapse as AntdCollapse, CollapseProps } from "antd";
import { ReactComponent as UnFold } from "icons/icon-unfold.svg";
import { ReactComponent as Folded } from "icons/icon-folded.svg";
import { ReactComponent as Omit } from "icons/icon-omit.svg";
Expand Down Expand Up @@ -98,6 +98,12 @@ export const Collapse = (props: Iprops) => {
// setColor(keys.length ? "#F2F7FC" : "");
// onChange && onChange(keys);
// };
const collapseItems:CollapseProps['items'] = config.map((item) => ({
key: item.key,
label: item.title,
children: item.data,
}))

return (
// <Contain $color={props.isSelected || Color!==""}>
<Container optColor={props.isSelected} simple={props.simple} className={props.className}>
Expand All @@ -106,19 +112,8 @@ export const Collapse = (props: Iprops) => {
expandIcon={getExpandIcon}
defaultActiveKey={props.isOpen ? [props.config[0].key] : []}
// onChange={handlechange}
>
{config && config.length > 0
? config.map((item, index) => {
return (
<React.Fragment key={index}>
<Panel header={item.title} key={item.key} showArrow={true}>
{item.data}
</Panel>
</React.Fragment>
);
})
: null}
</AntdCollapse>
items={collapseItems}
/>
</Container>
);
};
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder-design/src/components/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const CustomPopover = (props: {
);
return (
<Popover
overlayInnerStyle={{padding: 0}}
content={contentWithBox}
trigger="click"
open={visible}
Expand Down