Skip to main content

dioxus_element_plug/components/
table_column.rs

1use dioxus::prelude::*;
2
3/// TableColumn props
4#[derive(Props, Clone, PartialEq)]
5pub struct TableColumnProps {
6    /// Column label (header text)
7    #[props(default)]
8    pub label: Option<String>,
9
10    /// Column prop/field name
11    #[props(default)]
12    pub prop: Option<String>,
13
14    /// Column width
15    #[props(default)]
16    pub width: Option<String>,
17
18    /// Minimum column width
19    #[props(default)]
20    pub min_width: Option<String>,
21
22    /// Whether the column is fixed
23    #[props(default)]
24    pub fixed: Option<String>,
25
26    /// Whether the column is sortable
27    #[props(default = false)]
28    pub sortable: bool,
29
30    /// Column type (selection, index, expand)
31    #[props(default)]
32    pub column_type: Option<String>,
33
34    /// Whether the column is resizable
35    #[props(default = true)]
36    pub resizable: bool,
37
38    /// Text alignment
39    #[props(default = "left".to_string())]
40    pub align: String,
41
42    /// Header alignment
43    #[props(default)]
44    pub header_align: Option<String>,
45
46    /// Whether to show overflow tooltip
47    #[props(default = false)]
48    pub show_overflow_tooltip: bool,
49
50    #[props(default)]
51    pub class: Option<String>,
52}
53
54/// TableColumn component for defining table columns
55#[component]
56#[allow(unused_variables)]
57pub fn TableColumn(props: TableColumnProps) -> Element {
58    // TableColumn is a declarative component, it doesn't render directly
59    rsx! {}
60}