Skip to content
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

Functionality of CollapsingHeader and Drag'nDrop conflicting #5529

Open
Verhoef-W opened this issue Dec 28, 2024 · 0 comments
Open

Functionality of CollapsingHeader and Drag'nDrop conflicting #5529

Verhoef-W opened this issue Dec 28, 2024 · 0 comments
Labels
bug Something is broken

Comments

@Verhoef-W
Copy link

Describe the bug
When wrapping the CollapsingHeader inside of a dnd_drag_source layer it no longer shows the items inside or it now longer closes when clicking it. CollapsingHeader and dnd_drag_source both describes interactive behavior on how to behave when using the mouse. However the functionalities seem to conflict, while I would expect it both to work.

To Reproduce
Run following code:
ui.dnd_drag_source(Id::from("dnd_id"), 0, |ui| { egui::CollapsingHeader::new("collapsing header A").default_open(true).show(ui, |ui| { ui.label("Item 1A"); ui.label("Item 2A"); ui.label("Item 3A"); }); }); egui::CollapsingHeader::new("collapsing header B").default_open(true).show(ui, |ui| { ui.label("Item 1B"); ui.label("Item 2B"); ui.label("Item 3B"); });

Expected behavior
The Item 1A, 2A, 2A should show up (just like 1B, 2B, 3B does). Additionally the collapsing header should close again when clicking it. Of course 'collapsing header A' should also still enable drag 'n drop functionality.

Desktop (please complete the following information):

  • OS: Windows 11 Pro
  • Version 0.30 egui/eframe and Git master

Smartphone (please complete the following information):

  • Device:
  • OS:
  • Browser
  • Version

Additional context
The behavior on version 0.30 egui has the collapsing header A closed, while in the git master branch version it does not close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant