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 Card
s 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 Card
s 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 · source§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
source§impl PartialEq for CardSelectableActionsVariant
impl PartialEq for CardSelectableActionsVariant
source§fn eq(&self, other: &CardSelectableActionsVariant) -> bool
fn eq(&self, other: &CardSelectableActionsVariant) -> bool
self
and other
values to be equal, and is used
by ==
.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§
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> 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.