thaw/demo_markdown/docs/combobox/mod.md

39 lines
735 B
Markdown
Raw Normal View History

2024-06-27 14:51:36 +08:00
# Combobox
```rust demo
2024-07-25 15:10:49 +08:00
let selected_options = RwSignal::new(None::<String>);
2024-06-27 14:51:36 +08:00
view! {
<Combobox selected_options>
<ComboboxOption value="cat" text="Car" />
<ComboboxOption value="dog" text="Dog" />
2024-06-27 14:51:36 +08:00
</Combobox>
}
```
2024-06-27 17:31:52 +08:00
### Clearable
```rust demo
let selected_options = RwSignal::new(vec![]);
2024-06-27 17:31:52 +08:00
view! {
2024-07-25 15:10:49 +08:00
<Combobox selected_options clearable=true>
<ComboboxOption value="cat" text="Car" />
<ComboboxOption value="dog" text="Dog" />
2024-06-27 17:31:52 +08:00
</Combobox>
}
```
2024-06-27 14:51:36 +08:00
### Multiselect
```rust demo
let selected_options = RwSignal::new(vec![]);
2024-06-27 14:51:36 +08:00
view! {
2024-07-25 15:10:49 +08:00
<Combobox selected_options>
<ComboboxOption value="cat" text="Car" />
<ComboboxOption value="dog" text="Dog" />
2024-06-27 14:51:36 +08:00
</Combobox>
}
```