Crate yew_autocomplete

source ·
Expand description

This crate provides a highly configurable auto-completion component

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>>
};

Modules

Structs

Enums

Type Aliases