pub struct DataTableColumnDef {Show 25 fields
pub field: String,
pub header_name: String,
pub description: Option<String>,
pub col_type: ColumnType,
pub width: ColumnWidth,
pub min_width: Option<f64>,
pub max_width: Option<f64>,
pub sortable: bool,
pub filterable: bool,
pub pinned: Option<PinSide>,
pub align: CellAlign,
pub hideable: bool,
pub reorderable: bool,
pub col_span: u32,
pub row_span_merge: bool,
pub resolve_value: Option<Callback<(DataRecord,), DataValue>>,
pub format_display: Option<Callback<(DataValue,), String>>,
pub cell_view: Option<Arc<dyn Fn(DataRecord) -> AnyView + Send + Sync>>,
pub header_view: Option<Arc<dyn Fn() -> AnyView + Send + Sync>>,
pub compare_values: Option<Callback<(DataValue, DataValue), Ordering>>,
pub editable: bool,
pub edit_options: Option<Vec<String>>,
pub validate_value: Option<Callback<(DataValue,), Result<DataValue, String>>>,
pub edit_view: Option<Arc<dyn Fn(EditCellProps) -> AnyView + Send + Sync>>,
pub cell_class: Option<Callback<(DataRecord,), String>>,
}Expand description
Column definition for crate::DataTable.
Fields§
§field: StringBinds to orbital_data::FieldDef::key in the dataset schema.
header_name: StringHeader label shown in the table.
description: Option<String>Optional column description (tooltip / a11y).
col_type: ColumnTypeColumn type for typed sort/filter.
width: ColumnWidthWidth mode (fixed, flex, or auto).
min_width: Option<f64>Minimum width in pixels.
max_width: Option<f64>Maximum width in pixels.
sortable: boolWhether this column participates in sorting.
filterable: boolWhether this column participates in quick-search / filtering.
pinned: Option<PinSide>Initial pin side from column definition.
align: CellAlignHorizontal alignment for cell content.
hideable: boolWhether the column can be hidden via picker/menu.
reorderable: boolWhether the column can be drag-reordered.
col_span: u32Body cell column span (number of logical columns merged).
row_span_merge: boolMerge consecutive equal values in this column into one cell.
resolve_value: Option<Callback<(DataRecord,), DataValue>>Optional value resolver (default: field lookup on record).
format_display: Option<Callback<(DataValue,), String>>Optional display formatter (default: DataValue::display_string).
cell_view: Option<Arc<dyn Fn(DataRecord) -> AnyView + Send + Sync>>Custom cell renderer.
header_view: Option<Arc<dyn Fn() -> AnyView + Send + Sync>>Custom header renderer.
compare_values: Option<Callback<(DataValue, DataValue), Ordering>>Custom sort comparator (default: typed compare by col_type).
editable: boolWhether this column supports inline editing.
edit_options: Option<Vec<String>>Select options for editable SingleSelect columns.
validate_value: Option<Callback<(DataValue,), Result<DataValue, String>>>Optional per-field validator run before row commit.
edit_view: Option<Arc<dyn Fn(EditCellProps) -> AnyView + Send + Sync>>Custom inline edit renderer (default: typed Input/Select/Checkbox/DatePicker).
cell_class: Option<Callback<(DataRecord,), String>>Optional per-cell CSS class callback.
Implementations§
Source§impl DataTableColumnDef
impl DataTableColumnDef
pub fn new(field: impl Into<String>, header_name: impl Into<String>) -> Self
Sourcepub fn from_field_def(field: &FieldDef) -> Self
pub fn from_field_def(field: &FieldDef) -> Self
Build from a shared orbital_data::FieldDef.
pub fn with_col_type(self, col_type: ColumnType) -> Self
pub fn with_width(self, width: ColumnWidth) -> Self
pub fn with_min_width(self, min_width: f64) -> Self
pub fn with_max_width(self, max_width: f64) -> Self
pub fn with_pinned(self, pinned: PinSide) -> Self
pub fn with_align(self, align: CellAlign) -> Self
pub fn with_hideable(self, hideable: bool) -> Self
pub fn with_reorderable(self, reorderable: bool) -> Self
pub fn with_col_span(self, col_span: u32) -> Self
pub fn with_row_span_merge(self, enabled: bool) -> Self
pub fn with_description(self, description: impl Into<String>) -> Self
pub fn with_sortable(self, sortable: bool) -> Self
pub fn with_filterable(self, filterable: bool) -> Self
pub fn with_resolve_value(self, cb: Callback<(DataRecord,), DataValue>) -> Self
pub fn with_format_display(self, cb: Callback<(DataValue,), String>) -> Self
pub fn with_cell_view( self, view: Arc<dyn Fn(DataRecord) -> AnyView + Send + Sync>, ) -> Self
pub fn with_header_view( self, view: Arc<dyn Fn() -> AnyView + Send + Sync>, ) -> Self
pub fn with_compare_values( self, cb: Callback<(DataValue, DataValue), Ordering>, ) -> Self
pub fn with_editable(self, editable: bool) -> Self
pub fn with_edit_options(self, options: Vec<String>) -> Self
pub fn with_validate_value( self, cb: Callback<(DataValue,), Result<DataValue, String>>, ) -> Self
pub fn with_edit_view( self, view: Arc<dyn Fn(EditCellProps) -> AnyView + Send + Sync>, ) -> Self
Sourcepub fn is_editable(&self) -> bool
pub fn is_editable(&self) -> bool
Whether this column can enter inline edit mode.
Trait Implementations§
Source§impl Clone for DataTableColumnDef
impl Clone for DataTableColumnDef
Source§fn clone(&self) -> DataTableColumnDef
fn clone(&self) -> DataTableColumnDef
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DataTableColumnDef
impl Debug for DataTableColumnDef
Auto Trait Implementations§
impl !RefUnwindSafe for DataTableColumnDef
impl !UnwindSafe for DataTableColumnDef
impl Freeze for DataTableColumnDef
impl Send for DataTableColumnDef
impl Sync for DataTableColumnDef
impl Unpin for DataTableColumnDef
impl UnsafeUnpin for DataTableColumnDef
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
D: AdaptFrom<S, Swp, Dwp, T>,
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<T>,
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Source§impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
impl<T, C> ArraysFrom<C> for Twhere
C: IntoArrays<T>,
Source§fn arrays_from(colors: C) -> T
fn arrays_from(colors: C) -> T
Source§impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
impl<T, C> ArraysInto<C> for Twhere
C: FromArrays<T>,
Source§fn arrays_into(self) -> C
fn arrays_into(self) -> C
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
impl<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for Uwhere
T: FromCam16Unclamped<WpParam, U>,
Source§type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn cam16_into_unclamped(
self,
parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>,
) -> T
fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
impl<T, C> ComponentsFrom<C> for Twhere
C: IntoComponents<T>,
Source§fn components_from(colors: C) -> T
fn components_from(colors: C) -> T
Source§impl<T> FromAngle<T> for T
impl<T> FromAngle<T> for T
Source§fn from_angle(angle: T) -> T
fn from_angle(angle: T) -> T
angle.Source§impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
impl<T, U> FromStimulus<U> for Twhere
U: IntoStimulus<T>,
Source§fn from_stimulus(other: U) -> T
fn from_stimulus(other: U) -> T
other into Self, while performing the appropriate scaling,
rounding and clamping.Source§impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
impl<T, U> IntoAngle<U> for Twhere
U: FromAngle<T>,
Source§fn into_angle(self) -> U
fn into_angle(self) -> U
T.Source§impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for Uwhere
T: Cam16FromUnclamped<WpParam, U>,
Source§type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar
parameters when converting.Source§fn into_cam16_unclamped(
self,
parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>,
) -> T
fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T
self into C, using the provided parameters.Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
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<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementMaybeSignal<T, Marker> for Elwhere
El: IntoElementMaybeSignalType<T, Marker>,
fn into_element_maybe_signal(self) -> ElementMaybeSignal<T>
Source§impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementMaybeSignalType<T, Element> for Js
fn into_element_maybe_signal_type(self) -> ElementMaybeSignalType<T>
Source§impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
impl<El, T, Marker> IntoElementsMaybeSignal<T, Marker> for Elwhere
El: IntoElementsMaybeSignalType<T, Marker>,
fn into_elements_maybe_signal(self) -> ElementsMaybeSignal<T>
Source§impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
impl<T, Js> IntoElementsMaybeSignalType<T, Element> for Js
fn into_elements_maybe_signal_type(self) -> ElementsMaybeSignalType<T>
Source§impl<T> IntoStimulus<T> for T
impl<T> IntoStimulus<T> for T
Source§fn into_stimulus(self) -> T
fn into_stimulus(self) -> T
self into T, while performing the appropriate scaling,
rounding and clamping.Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
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<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
impl<T, C> TryComponentsInto<C> for Twhere
C: TryFromComponents<T>,
Source§type Error = <C as TryFromComponents<T>>::Error
type Error = <C as TryFromComponents<T>>::Error
try_into_colors fails to cast.Source§fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>
Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
OutOfBounds error is returned which contains
the unclamped color. Read more