Added remove method for CollapsingState. (#3252)

This commit is contained in:
dmackdev 2023-08-14 17:57:07 +01:00 committed by GitHub
parent e5428a3084
commit 8ee506ec37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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::<InnerState>(self.id));
}
pub fn id(&self) -> Id {
self.id
}