Skip to content

Commit f4f6941

Browse files
Merge pull request #1925 from iamfaran/fix/1824-drag-query
[Fix]: #1824 query as a last item in folder
2 parents 0ca398c + 069c744 commit f4f6941

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

client/packages/lowcoder/src/components/DraggableTree/DroppableMenuItem.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export default function DraggableMenuItem(props: IDraggableMenuItemProps) {
6767
const canDropBefore = checkDroppableFlag(item.canDropBefore, activeNode?.data);
6868
const canDropAfter = checkDroppableFlag(item.canDropAfter, activeNode?.data);
6969

70+
const lastChildNode = items[items.length - 1];
71+
const canDropAfterLastChild = checkDroppableFlag(lastChildNode?.canDropAfter, activeNode?.data);
72+
7073
const dropData: IDropData = {
7174
targetListSize: items.length,
7275
targetPath: dropInAsSub ? [...path, 0] : [...path.slice(0, -1), path[path.length - 1] + 1],
@@ -136,6 +139,15 @@ export default function DraggableMenuItem(props: IDraggableMenuItemProps) {
136139
/>
137140
</Fragment>
138141
))}
142+
{activeNode && canDropAfterLastChild && (
143+
<div style={{ position: "relative" }}>
144+
<DroppablePlaceholder
145+
targetListSize={-1}
146+
path={[...path, items.length]}
147+
disabled={isDragging || disabled}
148+
/>
149+
</div>
150+
)}
139151
</div>
140152
)}
141153
</>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy