pub struct FilterInput { /* private fields */ }Expand description
What a Filter::control renders for one request.
Implementations§
Source§impl FilterInput
impl FilterInput
Sourcepub fn param(&self) -> &str
pub fn param(&self) -> &str
The form field name the control submits a value as; a control submitting several values repeats it.
Sourcepub fn part_param(&self, part: &str) -> String
pub fn part_param(&self, part: &str) -> String
The form field name the control submits part as: param.{part}.
Sourcepub fn value(&self) -> &FilterValue
pub fn value(&self) -> &FilterValue
The value the request carries for this filter.
Sourcepub fn select<'a>(
self,
cx: &'a Cx,
options: Vec<(String, String)>,
) -> Pin<Box<dyn View + 'a>>
pub fn select<'a>( self, cx: &'a Cx, options: Vec<(String, String)>, ) -> Pin<Box<dyn View + 'a>>
A labelled <select> over options, led by the empty “All” option, which is selected
while the filter holds no value. A select submits one value, so a filter holding several
(?f.status=draft&f.status=review) marks the first; the rest keep applying until the form
is submitted again.
Sourcepub fn checklist<'a>(
self,
cx: &'a Cx,
options: Vec<(String, String)>,
) -> Pin<Box<dyn View + 'a>>
pub fn checklist<'a>( self, cx: &'a Cx, options: Vec<(String, String)>, ) -> Pin<Box<dyn View + 'a>>
A labelled button opening a checkbox per option in options, each submitting its value
under param and checked while the filter holds it. The button reads the
checked options’ labels, or “All” while none is checked.
The list is a popover, so it stays open while the table reruns as each box changes.
Trait Implementations§
Source§impl Clone for FilterInput
impl Clone for FilterInput
Source§fn clone(&self) -> FilterInput
fn clone(&self) -> FilterInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more