ratatui-toolkit 0.2.6

DEPRECATED: this crate was renamed to `ratkit`. Please migrate to `ratkit`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Expand all sections method for CollapseState.

use crate::widgets::markdown_widget::state::collapse_state::CollapseState;

impl CollapseState {
    /// Expand all sections.
    pub fn expand_all(&mut self) {
        let section_ids: Vec<usize> = self.sections.keys().copied().collect();
        for section_id in section_ids {
            self.sections.insert(section_id, false);
        }
    }
}