pub struct SelectRoot { /* private fields */ }Expand description
A Radix-shaped Select root configuration surface (open state only).
Upstream Select owns both open and value state. Fret’s select primitive facade focuses on
input and overlay wiring; recipes typically own the selection model. This root helper exists to
standardize the controlled/uncontrolled open modeling (open / defaultOpen).
Implementations§
Source§impl SelectRoot
impl SelectRoot
pub fn new() -> Self
Sourcepub fn open(self, open: Option<Model<bool>>) -> Self
pub fn open(self, open: Option<Model<bool>>) -> Self
Sets the controlled open model (Some) or selects uncontrolled mode (None).
Sourcepub fn default_open(self, default_open: bool) -> Self
pub fn default_open(self, default_open: bool) -> Self
Sets the uncontrolled initial open value (Radix defaultOpen).
Sourcepub fn use_open_model<H: UiHost>(
&self,
cx: &mut ElementContext<'_, H>,
) -> ControllableModel<bool>
pub fn use_open_model<H: UiHost>( &self, cx: &mut ElementContext<'_, H>, ) -> ControllableModel<bool>
Returns a Model<bool> that behaves like Radix useControllableState for open.
pub fn open_model<H: UiHost>( &self, cx: &mut ElementContext<'_, H>, ) -> Model<bool>
pub fn is_open<H: UiHost>(&self, cx: &mut ElementContext<'_, H>) -> bool
pub fn modal_request<H: UiHost, I, T>(
&self,
cx: &mut ElementContext<'_, H>,
id: GlobalElementId,
trigger: GlobalElementId,
presence: OverlayPresence,
children: I,
) -> OverlayRequestwhere
I: IntoIterator<Item = T>,
T: IntoUiElement<H>,
Trait Implementations§
Source§impl Clone for SelectRoot
impl Clone for SelectRoot
Source§fn clone(&self) -> SelectRoot
fn clone(&self) -> SelectRoot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectRoot
impl Debug for SelectRoot
Source§impl Default for SelectRoot
impl Default for SelectRoot
Source§fn default() -> SelectRoot
fn default() -> SelectRoot
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SelectRoot
impl !RefUnwindSafe for SelectRoot
impl !Send for SelectRoot
impl !Sync for SelectRoot
impl Unpin for SelectRoot
impl UnsafeUnpin for SelectRoot
impl !UnwindSafe for SelectRoot
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