pub struct DataTableSavedViewsProps {
pub views: Vec<DataTableSavedView>,
pub state: DataTableViewState,
pub active_id: Option<String>,
pub reset_state: DataTableViewState,
pub on_apply: EventHandler<(DataTableViewState, Option<String>)>,
pub on_save: EventHandler<(String, DataTableViewState)>,
pub on_update: Option<EventHandler<(String, DataTableViewState)>>,
pub on_remove: Option<EventHandler<String>>,
pub disabled: bool,
pub labels: DataTableSavedViewsLabels,
}Expand description
Props for DataTableSavedViews.
Fields§
§views: Vec<DataTableSavedView>Saved views with unique, non-empty ids; views with an empty or repeated id are skipped.
state: DataTableViewStateThe current view state, used by save and update.
active_id: Option<String>The applied saved view.
reset_state: DataTableViewStateThe state the reset button applies.
on_apply: EventHandler<(DataTableViewState, Option<String>)>Called with a state to apply and the saved view id, or None after a reset.
on_save: EventHandler<(String, DataTableViewState)>Called with a trimmed name and the state to save.
on_update: Option<EventHandler<(String, DataTableViewState)>>Shows an update button for the active view.
on_remove: Option<EventHandler<String>>Shows a remove button for the active view.
disabled: boolDisables every control.
labels: DataTableSavedViewsLabelsLocalized copy.
Implementations§
Source§impl DataTableSavedViewsProps
impl DataTableSavedViewsProps
Sourcepub fn builder() -> DataTableSavedViewsPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> DataTableSavedViewsPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
Create a builder for building DataTableSavedViewsProps.
On the builder, call .views(...), .state(...), .active_id(...)(optional), .reset_state(...), .on_apply(...), .on_save(...), .on_update(...)(optional), .on_remove(...)(optional), .disabled(...)(optional), .labels(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of DataTableSavedViewsProps.
Trait Implementations§
Source§impl Clone for DataTableSavedViewsProps
impl Clone for DataTableSavedViewsProps
Source§impl PartialEq for DataTableSavedViewsProps
impl PartialEq for DataTableSavedViewsProps
Source§impl Properties for DataTableSavedViewsPropswhere
Self: Clone,
impl Properties for DataTableSavedViewsPropswhere
Self: Clone,
Source§type Builder = DataTableSavedViewsPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
type Builder = DataTableSavedViewsPropsBuilder<((), (), (), (), (), (), (), (), (), ())>
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 DataTableSavedViewsProps
Auto Trait Implementations§
impl !RefUnwindSafe for DataTableSavedViewsProps
impl !Send for DataTableSavedViewsProps
impl !Sync for DataTableSavedViewsProps
impl !UnwindSafe for DataTableSavedViewsProps
impl Forget for DataTableSavedViewsProps
impl Freeze for DataTableSavedViewsPropswhere
*const u8 is !null: Freeze,
PhantomData<DataTableSavedView>: Freeze,
PhantomData<u8>: Freeze,
PhantomData<DataTableFilter>: Freeze,
PhantomData<(String, bool)>: Freeze,
PhantomData<DataTableSort>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<(DataTableViewState, Option<String>), ()>>>: Freeze,
PhantomData<Option<ExternalListenerCallback<(String, DataTableViewState), ()>>>: Freeze,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: Freeze,
impl Move for DataTableSavedViewsProps
impl Unpin for DataTableSavedViewsPropswhere
*const u8 is !null: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut((DataTableViewState, Option<String>))>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
Box<dyn FnMut((String, DataTableViewState))>: Unpin,
Box<dyn FnMut(String)>: Unpin,
impl UnsafeUnpin for DataTableSavedViewsPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<DataTableSavedView>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<DataTableFilter>: UnsafeUnpin,
PhantomData<(String, bool)>: UnsafeUnpin,
PhantomData<DataTableSort>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<(DataTableViewState, Option<String>), ()>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<(String, DataTableViewState), ()>>>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<String, ()>>>: 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