pub struct GridQuery {
pub sort: Vec<(usize, SortDirection)>,
pub filters: Vec<String>,
pub search: String,
pub group_by: Vec<usize>,
pub collapsed: BTreeSet<String>,
pub hidden: Vec<bool>,
}Expand description
What the user asked the grid to show.
Fields§
§sort: Vec<(usize, SortDirection)>Sort columns in priority order.
filters: Vec<String>Filter-row text per column (index = column): the short syntax of matches_filter, or
a ravenrs_criteria expression over columns named by their titles, such as
[Seats] > 10 And [Country] = 'Brazil'.
search: StringText searched in every visible column.
group_by: Vec<usize>Grouping columns, outermost first.
collapsed: BTreeSet<String>Keys of collapsed groups (see ViewRow::Group::key).
Hidden columns are ignored by search.
Implementations§
Source§impl GridQuery
impl GridQuery
Sourcepub fn set_filter(&mut self, column: usize, text: String)
pub fn set_filter(&mut self, column: usize, text: String)
Sets the filter text of column (zero-based).
The column (zero-based) is hidden.
Sourcepub fn toggle_sort(&mut self, column: usize, add: bool)
pub fn toggle_sort(&mut self, column: usize, add: bool)
Plain click: sort by this column only, cycling ascending → descending →
none. With add, the column is added to (or cycled within) a multi-column sort.
Sourcepub fn toggle_group(&mut self, column: usize)
pub fn toggle_group(&mut self, column: usize)
Adds the column to or removes it from the grouping; expands all groups.
Sourcepub fn toggle_collapsed(&mut self, key: &str)
pub fn toggle_collapsed(&mut self, key: &str)
Collapses or expands the group with this key.