pub struct UseFloatingOptions {
pub open: MaybeProp<bool>,
pub placement: MaybeProp<Placement>,
pub strategy: MaybeProp<Strategy>,
pub middleware: MaybeProp<WrappedMiddleware>,
pub transform: MaybeProp<bool>,
pub while_elements_mounted: MaybeProp<SendWrapper<Rc<WhileElementsMountedFn>>>,
}Expand description
Options for use_floating.
Fields§
§open: MaybeProp<bool>Represents the open/close state of the floating element.
Defaults to true.
placement: MaybeProp<Placement>Where to place the floating element relative to the reference element.
Defaults to Placement::Bottom.
strategy: MaybeProp<Strategy>The strategy to use when positioning the floating element.
Defaults to Strategy::Absolute.
middleware: MaybeProp<WrappedMiddleware>Array of middleware objects to modify the positioning or provide data for rendering.
Defaults to an empty vector.
transform: MaybeProp<bool>Whether to use transform for positioning instead of top and left in the floatingStyles object.
Defaults to true.
while_elements_mounted: MaybeProp<SendWrapper<Rc<WhileElementsMountedFn>>>Callback to handle mounting/unmounting of the elements.
Defaults to Option::None.
Implementations§
Source§impl UseFloatingOptions
impl UseFloatingOptions
Sourcepub fn middleware<I: Into<MaybeProp<WrappedMiddleware>>>(self, value: I) -> Self
pub fn middleware<I: Into<MaybeProp<WrappedMiddleware>>>(self, value: I) -> Self
Set middleware option.
Sourcepub fn while_elements_mounted<I: Into<MaybeProp<SendWrapper<Rc<WhileElementsMountedFn>>>>>(
self,
value: I,
) -> Self
pub fn while_elements_mounted<I: Into<MaybeProp<SendWrapper<Rc<WhileElementsMountedFn>>>>>( self, value: I, ) -> Self
Set while_elements_mounted option.
Sourcepub fn while_elements_mounted_auto_update(self) -> Self
pub fn while_elements_mounted_auto_update(self) -> Self
Set while_elements_mounted option to auto_update with AutoUpdateOptions::default.
Sourcepub fn while_elements_mounted_auto_update_with_enabled(
self,
enabled: Signal<bool>,
) -> Self
pub fn while_elements_mounted_auto_update_with_enabled( self, enabled: Signal<bool>, ) -> Self
Set while_elements_mounted option to auto_update with AutoUpdateOptions::default when enabled is true.
Sourcepub fn while_elements_mounted_auto_update_with_options(
self,
options: Signal<AutoUpdateOptions>,
) -> Self
pub fn while_elements_mounted_auto_update_with_options( self, options: Signal<AutoUpdateOptions>, ) -> Self
Set while_elements_mounted option to auto_update with options.
Sourcepub fn while_elements_mounted_auto_update_with_enabled_and_options(
self,
enabled: Signal<bool>,
options: Signal<AutoUpdateOptions>,
) -> Self
pub fn while_elements_mounted_auto_update_with_enabled_and_options( self, enabled: Signal<bool>, options: Signal<AutoUpdateOptions>, ) -> Self
Set while_elements_mounted option to auto_update with options when enabled is true.
Trait Implementations§
Source§impl Clone for UseFloatingOptions
impl Clone for UseFloatingOptions
Source§fn clone(&self) -> UseFloatingOptions
fn clone(&self) -> UseFloatingOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for UseFloatingOptions
impl Default for UseFloatingOptions
Source§fn default() -> UseFloatingOptions
fn default() -> UseFloatingOptions
Auto Trait Implementations§
impl Freeze for UseFloatingOptions
impl RefUnwindSafe for UseFloatingOptions
impl Send for UseFloatingOptions
impl Sync for UseFloatingOptions
impl Unpin for UseFloatingOptions
impl UnwindSafe for UseFloatingOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more