diff --git a/src/widget.rs b/src/widget.rs index c8247df..1e314eb 100644 --- a/src/widget.rs +++ b/src/widget.rs @@ -2156,6 +2156,11 @@ impl WidgetList { self.ordered.truncate(length); } + /// Clear the list + pub fn clear(&mut self) { + self.ordered.clear(); + } + /// Returns `self` as a vertical [`Stack`] of rows. #[must_use] pub fn into_rows(self) -> Stack {