pub struct EuvAutoCompleteProps {
pub options: Vec<EuvAutoCompleteOption>,
pub value: Signal<String>,
pub placeholder: &'static str,
pub label: &'static str,
pub on_change: Option<Rc<dyn Fn(&'static str)>>,
pub on_select: Option<Rc<dyn Fn(&'static str)>>,
}Expand description
Props for the euv_auto_complete component.
The text in the field lives in a caller-owned Signal so the component
takes part in two-way binding; the open state of the suggestion panel is
owned by the component itself.
Fields§
§options: Vec<EuvAutoCompleteOption>The suggestions offered to the user.
value: Signal<String>The text currently held by the field.
placeholder: &'static strThe placeholder shown while the field is empty.
label: &'static strThe label rendered above the field.
An empty string renders the field without a label.
on_change: Option<Rc<dyn Fn(&'static str)>>The callback invoked with the typed text after every change.
The text is handed over as a 'static slice, so the component
leaks one small string per distinct value the user types.
on_select: Option<Rc<dyn Fn(&'static str)>>The callback invoked with the value of the picked suggestion.
Trait Implementations§
Source§impl Clone for EuvAutoCompleteProps
impl Clone for EuvAutoCompleteProps
Source§impl Debug for EuvAutoCompleteProps
impl Debug for EuvAutoCompleteProps
Auto Trait Implementations§
impl !RefUnwindSafe for EuvAutoCompleteProps
impl !Send for EuvAutoCompleteProps
impl !Sync for EuvAutoCompleteProps
impl !UnwindSafe for EuvAutoCompleteProps
impl Freeze for EuvAutoCompleteProps
impl Unpin for EuvAutoCompleteProps
impl UnsafeUnpin for EuvAutoCompleteProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more