Expand description
Feature-rich list component with filtering and pagination.
This module provides a list widget with optional filtering, pagination, help display, status messages, and spinner for TUI applications.
§Example
use bubbles::list::{List, Item, DefaultDelegate};
#[derive(Clone)]
struct MyItem {
title: String,
description: String,
}
impl Item for MyItem {
fn filter_value(&self) -> &str {
&self.title
}
}
let items = vec![
MyItem { title: "Apple".into(), description: "A fruit".into() },
MyItem { title: "Banana".into(), description: "Another fruit".into() },
];
let list = List::new(items, DefaultDelegate::new(), 80, 24);Structs§
- Default
Delegate - Default delegate for simple item rendering.
- Filter
Matches Msg - Message for filter matches.
- KeyMap
- Key bindings for list navigation.
- List
- List model with filtering, pagination, and more.
- Rank
- Represents a match rank from filtering.
- Status
Message Timeout Msg - Message for status message timeout.
- Styles
- Styles for the list.
Enums§
- Filter
State - Filter state.
Traits§
- Item
- Trait for items that can be displayed in a list.
- Item
Delegate - Trait for rendering list items.
Functions§
- default_
filter - Default filter using simple substring matching.
Type Aliases§
- Filter
Fn - Type alias for filter functions.