Crates.io | yew-autocomplete |
lib.rs | yew-autocomplete |
version | 0.3.1 |
source | src |
created_at | 2023-06-06 22:23:29.129004 |
updated_at | 2023-12-04 23:18:55.016564 |
description | Auto-complete input for yew.rs |
homepage | |
repository | https://git.vdx.hu/voidcontext/yew-components |
max_upload_size | |
id | 884244 |
size | 85,665 |
A highly configurable auto completion component for yew.rs.
A minimal example that showcases the main building blocks:
use yew::prelude::*;
use yew_autocomplete::{view::Bulma, Autocomplete, ItemResolver, ItemResolverResult};
use yew_commons::FnProp;
let onchange = |_: Vec<String>| ();
let resolve_items: ItemResolver<String> =
FnProp::from(|_: String| -> ItemResolverResult<String> {
Box::pin(async { Ok(Vec::<String>::new()) })
});
html! {
<Autocomplete<String>
{resolve_items}
{onchange}
auto = false
>
<Bulma<String> />
</Autocomplete<String>>
};