2024-06-27 14:51:36 +08:00
|
|
|
# Combobox
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let value = RwSignal::new(vec![]);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<Combobox value>
|
|
|
|
<ComboboxOption key="cat">
|
|
|
|
"Cat"
|
|
|
|
</ComboboxOption>
|
|
|
|
<ComboboxOption key="dog">
|
|
|
|
"Dog"
|
|
|
|
</ComboboxOption>
|
|
|
|
</Combobox>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-06-27 17:31:52 +08:00
|
|
|
### Clearable
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let value = RwSignal::new(vec![]);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<Combobox value multiselect=true clearable=true>
|
|
|
|
<ComboboxOption key="cat">
|
|
|
|
"Cat"
|
|
|
|
</ComboboxOption>
|
|
|
|
<ComboboxOption key="dog">
|
|
|
|
"Dog"
|
|
|
|
</ComboboxOption>
|
|
|
|
</Combobox>
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-06-27 14:51:36 +08:00
|
|
|
### Multiselect
|
|
|
|
|
|
|
|
```rust demo
|
|
|
|
let value = RwSignal::new(vec![]);
|
|
|
|
|
|
|
|
view! {
|
|
|
|
<Combobox value multiselect=true>
|
|
|
|
<ComboboxOption key="cat">
|
|
|
|
"Cat"
|
|
|
|
</ComboboxOption>
|
|
|
|
<ComboboxOption key="dog">
|
|
|
|
"Dog"
|
|
|
|
</ComboboxOption>
|
|
|
|
</Combobox>
|
|
|
|
}
|
|
|
|
```
|