pub struct ColumnBadges { /* private fields */ }Expand description
The list columns that show their value as a coloured badge, by column key, as Filament’s
TextColumn::make($key)->badge()->color(fn (string $state) => ...). A column that is not
listed shows its value as plain text.
Implementations§
Source§impl ColumnBadges
impl ColumnBadges
Sourcepub fn badge(self, column: impl Into<String>) -> Self
pub fn badge(self, column: impl Into<String>) -> Self
Shows the column column as a badge in the primary colour, as Filament’s ->badge()
with no color().
Sourcepub fn badge_color(
self,
column: impl Into<String>,
color: impl Fn(&str) -> BadgeColor + Send + Sync + 'static,
) -> Self
pub fn badge_color( self, column: impl Into<String>, color: impl Fn(&str) -> BadgeColor + Send + Sync + 'static, ) -> Self
Shows the column column as a badge whose colour color picks from the cell’s state,
as Filament’s ->badge()->color(fn (string $state): string => match ($state) { ... }).
The state is the stored value as text, such as "draft", before a select’s or a
lookup’s label replaces it for display.
Trait Implementations§
Source§impl Clone for ColumnBadges
impl Clone for ColumnBadges
Source§impl Debug for ColumnBadges
impl Debug for ColumnBadges
Auto Trait Implementations§
impl !RefUnwindSafe for ColumnBadges
impl !UnwindSafe for ColumnBadges
impl Forget for ColumnBadges
impl Freeze for ColumnBadges
impl Move for ColumnBadges
impl Send for ColumnBadges
impl Sync for ColumnBadges
impl Unpin for ColumnBadges
impl UnsafeUnpin for ColumnBadges
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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> ⓘ
Converts
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> ⓘ
Converts
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