ratatui_toolkit/widgets/markdown_widget/state/collapse_state/methods/expand_all.rs
1//! Expand all sections method for CollapseState.
2
3use crate::widgets::markdown_widget::state::collapse_state::CollapseState;
4
5impl CollapseState {
6 /// Expand all sections.
7 pub fn expand_all(&mut self) {
8 let section_ids: Vec<usize> = self.sections.keys().copied().collect();
9 for section_id in section_ids {
10 self.sections.insert(section_id, false);
11 }
12 }
13}