diff --git a/crates/egui/src/containers/collapsing_header.rs b/crates/egui/src/containers/collapsing_header.rs index 00f4ff73bc3..5eda61b607c 100644 --- a/crates/egui/src/containers/collapsing_header.rs +++ b/crates/egui/src/containers/collapsing_header.rs @@ -36,6 +36,10 @@ impl CollapsingState { ctx.data_mut(|d| d.insert_persisted(self.id, self.state)); } + pub fn remove(&self, ctx: &Context) { + ctx.data_mut(|d| d.remove::(self.id)); + } + pub fn id(&self) -> Id { self.id }