diff --git a/src/widgets/multi_list.rs b/src/widgets/multi_list.rs index ff132109..0cf00cd2 100644 --- a/src/widgets/multi_list.rs +++ b/src/widgets/multi_list.rs @@ -1,4 +1,4 @@ -use std::collections::HashSet; +use std::{borrow::Borrow, collections::HashSet}; use super::{Block, ListItem, StatefulWidget, Widget}; use crate::{ @@ -47,6 +47,10 @@ impl MultiListState { pub fn get_highlight(&mut self) -> Option { self.highlighted } + + pub fn get_selections(&self) -> &HashSet { + self.selected.borrow() + } } #[derive(Debug, Clone)]