pub struct ComboBox {
pub text: Property<String>,
pub selected: Property<Option<usize>>,
pub options: Property<Vec<String>>,
pub new_item: Property<NewItem>,
pub background: Property<Color>,
pub stroke: Property<Stroke>,
pub style: Property<TextStyle>,
pub corner_radius: Property<f64>,
pub _filtered_options: Property<Vec<ListItemData>>,
pub _options_visible: Property<bool>,
pub _selected_listener: Property<bool>,
}Expand description
A text-filtered list control for selecting one item, with optional “new item” behavior.
Fields§
§text: Property<String>Text currently shown in the input.
selected: Property<Option<usize>>Selected option index, or None when there is no valid selection.
options: Property<Vec<String>>Available option labels.
new_item: Property<NewItem>Behavior when the typed text does not match any option.
background: Property<Color>Textbox/list background color.
stroke: Property<Stroke>Textbox/list stroke.
style: Property<TextStyle>Text style for the textbox and list items.
corner_radius: Property<f64>Textbox corner radius, in pixels.
_filtered_options: Property<Vec<ListItemData>>§_options_visible: Property<bool>§_selected_listener: Property<bool>Implementations§
Source§impl ComboBox
impl ComboBox
pub fn on_mount(&mut self, ctx: &NodeContext)
pub fn on_click(&mut self, ctx: &NodeContext, _event: Event<Click>)
pub fn textbox_change( &mut self, ctx: &NodeContext, _event: Event<TextboxChange>, )
pub fn remove_index(&mut self, ctx: &NodeContext, event: Event<Click>)
pub fn update(&mut self, ctx: &NodeContext)
pub fn dispatch_new_item(&mut self, ctx: &NodeContext)
Trait Implementations§
Source§impl CoercionRules for ComboBox
impl CoercionRules for ComboBox
Source§impl<'de> Deserialize<'de> for ComboBox
impl<'de> Deserialize<'de> for ComboBox
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HelperFunctions for ComboBox
impl HelperFunctions for ComboBox
Source§fn register_all_functions()
fn register_all_functions()
Registers all helper functions for this type.
impl ImplToFromPaxAny for ComboBox
Source§impl Interpolatable for ComboBox
impl Interpolatable for ComboBox
Source§fn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Source§impl ToPaxValue for ComboBox
impl ToPaxValue for ComboBox
Source§fn to_pax_value(self) -> PaxValue
fn to_pax_value(self) -> PaxValue
Converts this value into a
PaxValue.Auto Trait Implementations§
impl Freeze for ComboBox
impl RefUnwindSafe for ComboBox
impl Send for ComboBox
impl Sync for ComboBox
impl Unpin for ComboBox
impl UnsafeUnpin for ComboBox
impl UnwindSafe for ComboBox
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> PropertyValue for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.
Source§impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
impl<T> ToFromPaxAny for Twhere
T: ImplToFromPaxAny,
Source§fn to_pax_any(self) -> PaxAny
fn to_pax_any(self) -> PaxAny
Converts this value into a
PaxAny.Source§fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
fn from_pax_any(pax_any: PaxAny) -> Result<T, String>
Attempts to recover this concrete type from a
PaxAny.