Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default function DraggableMenuItem(props: IDraggableMenuItemProps) {
>
<span style={{cursor: "default"}}>⣿</span>
</DraggableItem>
<div style={{flex: 1}}>
<div style={{ flex: 1 , maxWidth: "calc(100% - 12px)" }}>
{renderContent?.({
node: item,
isOver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ const HighlightBorder = styled.div<{ $active: boolean; $foldable: boolean; $leve
max-width: 100%;
flex: 1;
display: flex;
padding-left: ${(props) => props.$level * 20 + (props.$foldable ? 0 : 14)}px;
padding-left: ${(props) => props.$level * 10 + (props.$foldable ? 0 : 14)}px;
border-radius: 4px;
border: 1px solid ${(props) => (props.$active ? BorderActiveColor : "transparent")};
align-items: center;
Expand Down
15 changes: 10 additions & 5 deletions client/packages/lowcoder/src/pages/editor/right/ModulePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const ItemWrapper = styled.div`
}
.module-container {
display: flex;
width: 195px;
}
.module-icon {
margin-right: 4px;
Expand Down Expand Up @@ -167,6 +168,7 @@ interface ModuleItemProps {
setSelectedType: (id: boolean) => void;
resComp: NodeType;
id: string;
$level: number;
}

function ModuleItem(props: ModuleItemProps) {
Expand All @@ -179,7 +181,8 @@ function ModuleItem(props: ModuleItemProps) {
selectedType,
setSelectedType,
resComp,
id
id,
$level,
} = props;
const dispatch = useDispatch();
const type = resComp.isFolder;
Expand Down Expand Up @@ -243,8 +246,9 @@ function ModuleItem(props: ModuleItemProps) {
>
<div className="module-container" >
<ModuleDocIcon className="module-icon"/>
<div style={{flexGrow: 1, marginRight: "8px", width: "calc(100% - 62px)"}}>
<EditText
<div style={{ flexGrow: 1, maxWidth: 174 - $level*10 }}>
<EditText
style={{ width: "100%" }}
text={meta.name}
forceClickIcon={false}
disabled={!isSelected || readOnly || isOverlay}
Expand All @@ -268,7 +272,7 @@ const HighlightBorder = styled.div<{ $active: boolean; $foldable: boolean; $leve
max-width: 100%;
flex: 1;
display: flex;
padding-left: ${(props) => props.$level * 20 + (props.$foldable ? 0 : 14)}px;
padding-left: ${(props) => props.$level * 10 + (props.$foldable ? 0 : 14)}px;
border-radius: 4px;
border: 1px solid ${(props) => (props.$active ? BorderActiveColor : "transparent")};
align-items: center;
Expand Down Expand Up @@ -479,7 +483,8 @@ function ModuleSidebarItem(props: ModuleSidebarItemProps) {
selectedType={selectedType}
setSelectedType={setSelectedType}
resComp = {resComp}
id = {id}
id={id}
$level={level}
/>}
{!readOnly && !isOverlay && (
<EditPopover del={() => onDelete()}>
Expand Down
Loading