pub struct ListProps {Show 14 fields
pub header: Option<Element>,
pub footer: Option<Element>,
pub bordered: bool,
pub size: Option<ComponentSize>,
pub class: Option<String>,
pub style: Option<String>,
pub loading: bool,
pub is_empty: Option<bool>,
pub empty: Option<Element>,
pub pagination_total: Option<u32>,
pub pagination_current: Option<u32>,
pub pagination_page_size: Option<u32>,
pub pagination_on_change: Option<EventHandler<(u32, u32)>>,
pub children: Element,
}Expand description
Props for the List component (MVP subset).
Fields§
§header: Option<Element>Optional header content displayed above the list items.
Optional footer content displayed below the list body.
bordered: boolWhether to render a border around the list.
size: Option<ComponentSize>Visual density. When set, maps to size-specific classes.
class: Option<String>Extra class name for the root element.
style: Option<String>Inline style for the root element.
loading: boolWhether the list is in loading state. When true, the body is wrapped with a Spin overlay.
is_empty: Option<bool>Whether the data set is empty (used together with loading=false).
empty: Option<Element>Custom empty content. When omitted and is_empty = Some(true), the
built-in Empty component is used.
pagination_total: Option<u32>Pagination total items. When set, enables a simple Pagination control at the bottom of the list.
pagination_current: Option<u32>Current page index for pagination (1-based).
pagination_page_size: Option<u32>Page size for pagination.
pagination_on_change: Option<EventHandler<(u32, u32)>>Callback when pagination changes.
children: ElementList item content. Callers通常在内部渲染多个块元素,并使用
.adui-list-item 类名标记每一行。
Implementations§
Source§impl ListProps
impl ListProps
Sourcepub fn builder() -> ListPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ListPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ListProps.
On the builder, call .header(...)(optional), .footer(...)(optional), .bordered(...)(optional), .size(...)(optional), .class(...)(optional), .style(...)(optional), .loading(...)(optional), .is_empty(...)(optional), .empty(...)(optional), .pagination_total(...)(optional), .pagination_current(...)(optional), .pagination_page_size(...)(optional), .pagination_on_change(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ListProps.