What's the best way to copy/duplicate (without having the copied element randomly appear on page)?

I’m trying to copy/duplicate components (often with many child components).

When I click a component handle and then click ā€œduplicateā€, where should the duplicate end up?

  1. Sometimes its within the same container - this is expected.
  2. Sometimes it’s at the bottom of all the components - this happens usually.
  3. Sometimes it’s at the top of all the components - this happens occasionally

Same with the Copy & Paste action. Which also sometimes pastes every element?

See a video here:

How can I copy an element and specifically indicate at which point in the component tree it should appear?

Right now, it feels completely random - making both the Copy & paste and Duplicate feature feel like more work than just redoing it all.

Hi @Sbenders_Pryon,

Technically you just have to click the component into which you want to paste what you’ve copied. The issue with the tree view of the comonents under ā€˜App structure’ is that it’s not enough to click on the component in the list where you want to paste it in, but you then need the select the component again in the UI.
28-01-2025_08-41-46
In the video you can see that I need to click the flexContainer again to copy it and then I need to click on the gridView component again (always in the UI) to paste it there. Towards the end you can see that when I click on ā€˜container’ in the tree view, it will not paste until I click it again in the UI.
Plus you can also see that when trying to paste directly into the ā€˜container’ it will paste it into ā€˜view 1’ because ā€˜container’ can only hold views.

But yeah, wether it gets pasted at the beginning or end is a bit component dependent, e.g. pasting it into ā€˜container’ (or actually ā€˜view 1’) will always place it at the end, while pasting into ā€˜gridView’ will always place it at the start.

So overall it’s a bit janky and tedious, but manageable. If it gets pasted into
the wrong component, it’s also not that hard to move it to it’s correct position.

2 Likes

Oh my gosh @Max, thank you for these tips/pointers!
I’m assuming you use Ctrl C + V to paste after selecting the element in the UI.

I will try this out! I am hopeful this will be very helpful in at least getting the component close to where I want it.
Thank you very much!

1 Like

@Max - the thing that REALLY helped was the ā€œremember to click on the element in the canvas AGAINā€ - that helps direct the action. Thank you!

2 Likes