mirror of
https://github.com/adoyle0/thaw.git
synced 2025-01-24 06:49:21 -05:00
50 lines
869 B
Markdown
50 lines
869 B
Markdown
# Combobox
|
|
|
|
```rust demo
|
|
let value = RwSignal::new(vec![]);
|
|
|
|
view! {
|
|
<Combobox value>
|
|
<ComboboxOption key="cat">
|
|
"Cat"
|
|
</ComboboxOption>
|
|
<ComboboxOption key="dog">
|
|
"Dog"
|
|
</ComboboxOption>
|
|
</Combobox>
|
|
}
|
|
```
|
|
|
|
### 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>
|
|
}
|
|
```
|
|
|
|
### Multiselect
|
|
|
|
```rust demo
|
|
let value = RwSignal::new(vec![]);
|
|
|
|
view! {
|
|
<Combobox value multiselect=true>
|
|
<ComboboxOption key="cat">
|
|
"Cat"
|
|
</ComboboxOption>
|
|
<ComboboxOption key="dog">
|
|
"Dog"
|
|
</ComboboxOption>
|
|
</Combobox>
|
|
}
|
|
```
|