2024-06-27 14:51:36 +08:00
|
|
|
# Combobox
|
|
|
|
|
|
|
|
```rust demo
|
2024-07-01 16:32:28 +08:00
|
|
|
let selected_options = RwSignal::new(vec![]);
|
2024-06-27 14:51:36 +08:00
|
|
|
|
|
|
|
view! {
|
2024-07-01 16:32:28 +08:00
|
|
|
<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
|
2024-07-01 16:32:28 +08:00
|
|
|
let selected_options = RwSignal::new(vec![]);
|
2024-06-27 17:31:52 +08:00
|
|
|
|
|
|
|
view! {
|
2024-07-01 16:32:28 +08:00
|
|
|
<Combobox selected_options multiselect=true 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
|
2024-07-01 16:32:28 +08:00
|
|
|
let selected_options = RwSignal::new(vec![]);
|
2024-06-27 14:51:36 +08:00
|
|
|
|
|
|
|
view! {
|
2024-07-01 16:32:28 +08:00
|
|
|
<Combobox selected_options multiselect=true>
|
|
|
|
<ComboboxOption value="cat" text="Car" />
|
|
|
|
<ComboboxOption value="dog" text="Dog" />
|
2024-06-27 14:51:36 +08:00
|
|
|
</Combobox>
|
|
|
|
}
|
|
|
|
```
|