diff --git a/src/lib.rs b/src/lib.rs index 7e82941..7d0d795 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -440,6 +440,12 @@ impl TreeView { self.list.set_collapsed(index, collapsed); } + /// Returns true if the row is collapsed, otherwise returns false + pub fn is_collapsed(&mut self, row: usize) -> bool { + let index = self.list.row_to_item_index(row); + self.list.get_collapsed(index) + } + /// Collapses or expands the children of the given `row`. /// /// Chained variant.