pub enum CardSelectableActionsVariant {
Click {
onclick: Option<Callback<MouseEvent>>,
},
SingleSelect {
onchange: Option<Callback<()>>,
},
MultiSelect {
onchange: Callback<CheckboxState>,
checked: CheckboxState,
},
}Expand description
Selectable actions for a card. Note the hints about clickable and selectable in the containing Card.
Variants§
Click
The entire card is clickable. Performs an action on click.
Clicking the card will highlight the card.
If you only want a single card out of a selection to be highlighted,
then make sure that the name field of the [CardHeaderSelectableActionsObjectBase]
has the same value in all Cards between which you want to differentiate.
Requires setting clickable to true and selectable to false in the containing Card.
Fields
onclick: Option<Callback<MouseEvent>>SingleSelect
Uses radio selection for selecting the card.
Requires setting clickable to true in the containing Card.
To make sure that only a single Card out of a group can be selected at once,
make sure that the name field of the [CardHeaderSelectableActionsObjectBase]
has the same value in all Cards between which you want to differentiate.
If clickable is false in the containing Card, then clicking anywhere within the card will toggle the state of the radio button.
If clickable is true in the containing Card, then only clicking the radio button itself will toggle the state of the radio button (to allow having other clickable content within the card such as links).
MultiSelect
Checkbox selection for selecting any amount of cards.
If clickable is false in the containing Card, then clicking anywhere within the card will toggle the state of the checkbox.
If clickable is true in the containing Card, then only clicking the radio button itself will toggle the state of the checkbox (to allow having other clickable content within the card such as links).
Trait Implementations§
Source§impl Clone for CardSelectableActionsVariant
impl Clone for CardSelectableActionsVariant
Source§fn clone(&self) -> CardSelectableActionsVariant
fn clone(&self) -> CardSelectableActionsVariant
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CardSelectableActionsVariant
impl Debug for CardSelectableActionsVariant
impl StructuralPartialEq for CardSelectableActionsVariant
Auto Trait Implementations§
impl Freeze for CardSelectableActionsVariant
impl !RefUnwindSafe for CardSelectableActionsVariant
impl !Send for CardSelectableActionsVariant
impl !Sync for CardSelectableActionsVariant
impl Unpin for CardSelectableActionsVariant
impl !UnwindSafe for CardSelectableActionsVariant
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.