Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

336
Views
Angular CDK Overlays - Change display order when dragging

Using Angular 12.

I'm creating multiple overlays from components:

this.currentComponents.map((component, index) => {
const positionStrategy = ...
const ref = this.overlay.create({positionStrategy});
const att = ref.attach(new ComponentPortal(component)};

this.drag.createDrag(ref.overlayElement, dragConfig).withBoundaryElement...;

This creates a draggable, free-floating overlay fine. It has a component inside that works fine.

On load, we create two of these which works fine. Both are draggable elements on the page, however the second is always placed over the first. How do I re-order these elements?

Basically, when I drag element A, it should go to the top. When I drag element B, it should go to the top.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!