pub struct TableProps {Show 14 fields
pub headers: Vec<String>,
pub rows: Signal<Vec<Vec<String>>>,
pub sortable: bool,
pub filterable: bool,
pub resizable: bool,
pub virtualized: bool,
pub columns_toggle: bool,
pub page_size: Option<usize>,
pub row_height: f64,
pub overscan: usize,
pub height: Option<f64>,
pub on_row_click: Option<Callback<usize>>,
pub on_cell_edit: Option<Callback<(usize, usize, String)>>,
pub selected_row: Option<Signal<Option<usize>>>,
}Expand description
Props for the Table component.
A data table with multi-column sort (shift-click for additive sort),
text filter, column resize and show/hide, sticky header, pagination, inline
cell edit, and optional row virtualization. rows is a reactive signal of
row data; on_row_click, on_cell_edit, and selected_row wire up
selection and editing.
§Required Props
- headers:
Vec<String> - rows:
impl Into<Signal<Vec<Vec<String>>>>
§Optional Props
- sortable:
bool - filterable:
bool - resizable:
bool - virtualized:
bool - columns_toggle:
bool - page_size:
usize - row_height:
f64 - overscan:
usize - height:
f64 - on_row_click:
Callback<usize> - on_cell_edit:
Callback<(usize, usize, String)> - selected_row:
impl Into<Signal<Option<usize>>>
Fields§
§headers: Vec<String>§rows: Signal<Vec<Vec<String>>>§sortable: bool§filterable: bool§resizable: bool§virtualized: bool§columns_toggle: bool§page_size: Option<usize>§row_height: f64§overscan: usize§height: Option<f64>§on_row_click: Option<Callback<usize>>§on_cell_edit: Option<Callback<(usize, usize, String)>>§selected_row: Option<Signal<Option<usize>>>Implementations§
Source§impl TableProps
impl TableProps
Sourcepub fn builder() -> TablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> TablePropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building TableProps.
On the builder, call .headers(...), .rows(...), .sortable(...)(optional), .filterable(...)(optional), .resizable(...)(optional), .virtualized(...)(optional), .columns_toggle(...)(optional), .page_size(...)(optional), .row_height(...)(optional), .overscan(...)(optional), .height(...)(optional), .on_row_click(...)(optional), .on_cell_edit(...)(optional), .selected_row(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of TableProps.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TableProps
impl RefUnwindSafe for TableProps
impl Send for TableProps
impl Sync for TableProps
impl Unpin for TableProps
impl UnsafeUnpin for TableProps
impl UnwindSafe for TableProps
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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 moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.