pub struct FilterBarProps {Show 15 fields
pub label: String,
pub filters: Vec<FilterBarFilter>,
pub on_remove_filter: Option<EventHandler<String>>,
pub on_reset: Option<EventHandler<()>>,
pub reset_label: String,
pub remove_label: Option<Callback<FilterBarFilter, String>>,
pub result_label: Option<String>,
pub pending: bool,
pub open: Option<bool>,
pub default_open: bool,
pub on_open_change: Option<EventHandler<bool>>,
pub actions: Option<Element>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Props for FilterBar.
Fields§
§label: StringAccessible name and disclosure summary. Defaults to Filters.
filters: Vec<FilterBarFilter>Active criteria, shown as chips.
on_remove_filter: Option<EventHandler<String>>Makes each chip a remove button that reports the filter id.
on_reset: Option<EventHandler<()>>Shows a reset button while filters are active.
reset_label: StringText of the reset button. Defaults to Reset filters.
remove_label: Option<Callback<FilterBarFilter, String>>Accessible name of a remove button. Defaults to filter_bar_remove_label.
result_label: Option<String>Complete localized result message, announced politely. Zero and unknown are different.
pending: boolMarks the results as updating and disables the chip buttons.
open: Option<bool>Controlled disclosure state of the filter controls.
default_open: boolInitial disclosure state when uncontrolled. Defaults to open.
on_open_change: Option<EventHandler<bool>>Called with the new disclosure state.
actions: Option<Element>Extra content after the chips, such as a save-view button.
class: Option<String>Extra classes appended after the Lumen class.
attributes: Vec<Attribute>Any other <section> or global attribute.
children: ElementThe filter controls inside the disclosure.
Implementations§
Source§impl FilterBarProps
impl FilterBarProps
Sourcepub fn builder() -> FilterBarPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FilterBarPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building FilterBarProps.
On the builder, call .label(...)(optional), .filters(...)(optional), .on_remove_filter(...)(optional), .on_reset(...)(optional), .reset_label(...)(optional), .remove_label(...)(optional), .result_label(...)(optional), .pending(...)(optional), .open(...)(optional), .default_open(...)(optional), .on_open_change(...)(optional), .actions(...)(optional), .class(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FilterBarProps.
Trait Implementations§
Source§impl Clone for FilterBarProps
impl Clone for FilterBarProps
Source§impl PartialEq for FilterBarProps
impl PartialEq for FilterBarProps
Source§impl Properties for FilterBarPropswhere
Self: Clone,
impl Properties for FilterBarPropswhere
Self: Clone,
Source§type Builder = FilterBarPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = FilterBarPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for FilterBarProps
Auto Trait Implementations§
impl !Freeze for FilterBarProps
impl !RefUnwindSafe for FilterBarProps
impl !Send for FilterBarProps
impl !Sync for FilterBarProps
impl !UnwindSafe for FilterBarProps
impl Forget for FilterBarProps
impl Move for FilterBarProps
impl Unpin for FilterBarPropswhere
*const u8 is !null: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut(String)>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
Box<dyn FnMut(())>: Unpin,
Box<dyn FnMut(FilterBarFilter) -> String>: Unpin,
Box<dyn FnMut(bool)>: Unpin,
Rc<VNodeInner>: Unpin,
Arc<Error>: Unpin,
NonZero<u32>: Unpin,
&'static str: Unpin,
Rc<RefCell<dyn FnMut(Event<dyn Any>)>>: Unpin,
Rc<dyn AnyValue>: Unpin,
impl UnsafeUnpin for FilterBarPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<FilterBarFilter>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<(), ()>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<FilterBarFilter, String>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<bool, ()>>>: UnsafeUnpin,
*const RcInner<VNodeInner> is !null: UnsafeUnpin,
PhantomData<RcInner<VNodeInner>>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more