pub struct DataTableViewProps {
pub label: String,
pub rows: Vec<DataTableRow>,
pub columns: Vec<DataTableViewColumn>,
pub render: Callback<DataTableViewResult, Element>,
pub state: Option<DataTableViewState>,
pub default_state: DataTableViewState,
pub on_state_change: Option<EventHandler<DataTableViewState>>,
pub row_count: Option<usize>,
pub disabled: bool,
pub searchable: bool,
pub toolbar: Option<Element>,
pub labels: DataTableViewLabels,
}Expand description
Props for DataTableView.
Fields§
§label: StringAccessible name of the view.
rows: Vec<DataTableRow>All records in client mode, or the current page in server mode. Ids must be unique.
columns: Vec<DataTableViewColumn>Column configuration.
render: Callback<DataTableViewResult, Element>Renders the table for the current page.
state: Option<DataTableViewState>Controlled view state.
default_state: DataTableViewStateInitial state when uncontrolled.
on_state_change: Option<EventHandler<DataTableViewState>>Called with every new state.
row_count: Option<usize>Server mode: the total matching rows. The view then never filters, sorts, or slices
rows; the application loads the page the state describes.
disabled: boolDisables every control.
searchable: boolShows the search field. Defaults to true.
toolbar: Option<Element>Extra toolbar content.
labels: DataTableViewLabelsLocalized copy.
Implementations§
Source§impl DataTableViewProps
impl DataTableViewProps
Sourcepub fn builder() -> DataTableViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> DataTableViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building DataTableViewProps.
On the builder, call .label(...), .rows(...), .columns(...), .render(...), .state(...)(optional), .default_state(...)(optional), .on_state_change(...)(optional), .row_count(...)(optional), .disabled(...)(optional), .searchable(...)(optional), .toolbar(...)(optional), .labels(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of DataTableViewProps.
Trait Implementations§
Source§impl Clone for DataTableViewProps
impl Clone for DataTableViewProps
Source§impl PartialEq for DataTableViewProps
impl PartialEq for DataTableViewProps
Source§impl Properties for DataTableViewPropswhere
Self: Clone,
impl Properties for DataTableViewPropswhere
Self: Clone,
Source§type Builder = DataTableViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
type Builder = DataTableViewPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), ())>
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 DataTableViewProps
Auto Trait Implementations§
impl !Freeze for DataTableViewProps
impl !RefUnwindSafe for DataTableViewProps
impl !Send for DataTableViewProps
impl !Sync for DataTableViewProps
impl !UnwindSafe for DataTableViewProps
impl Forget for DataTableViewProps
impl Move for DataTableViewProps
impl Unpin for DataTableViewPropswhere
*const u8 is !null: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut(DataTableViewResult) -> Result<VNode, RenderError>>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
Box<dyn FnMut(DataTableViewState)>: Unpin,
Rc<VNodeInner>: Unpin,
Arc<Error>: Unpin,
NonZero<u32>: Unpin,
impl UnsafeUnpin for DataTableViewPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<DataTableRow>: UnsafeUnpin,
PhantomData<DataTableViewColumn>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<DataTableViewResult, Result<VNode, RenderError>>>>: UnsafeUnpin,
PhantomData<DataTableFilter>: UnsafeUnpin,
PhantomData<(String, bool)>: UnsafeUnpin,
PhantomData<DataTableSort>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<DataTableViewState, ()>>>: UnsafeUnpin,
*const RcInner<VNodeInner> is !null: UnsafeUnpin,
PhantomData<RcInner<VNodeInner>>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
NonZeroU32Inner: 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