pub fn Table(props: TableProps) -> ElementExpand description
A table component for displaying structured data
This component provides a table with features like sorting, row highlighting, loading state, and empty state.
§Example
ⓘ
use dioxus_element_plug::components::table::{Table, TableColumn};
use std::collections::HashMap;
let columns = vec![
TableColumn {
title: "Name".to_string(),
key: "name".to_string(),
width: Some("200px".to_string()),
sortable: true,
fixed: None,
},
];
let mut row1 = HashMap::new();
row1.insert("name".to_string(), "John".to_string());
let data = vec![row1];
rsx! {
Table {
columns: columns,
data: data,
stripe: true,
}
}