pub struct RepeaterSettings { /* private fields */ }Expand description
The settings of a repeater or flexible content field, as Filament’s Repeater and
Builder methods. The default allows any number of rows, adds, deletes and moves rows,
and labels each row by its number.
Implementations§
Source§impl RepeaterSettings
impl RepeaterSettings
Sourcepub fn min_items(self, count: usize) -> Self
pub fn min_items(self, count: usize) -> Self
The fewest rows the field saves with, as Filament’s minItems(). Fewer is refused with
“
Sourcepub fn max_items(self, count: usize) -> Self
pub fn max_items(self, count: usize) -> Self
The most rows the field takes, as Filament’s maxItems(). The add button hides at the
limit, and more is refused with “
Sourcepub fn item_label(self, field: impl Into<String>) -> Self
pub fn item_label(self, field: impl Into<String>) -> Self
Labels each row by the value of its sub-field field, as Filament’s
itemLabel(fn (array $state) => $state['name']) and ACF’s “collapsed” setting. A row
whose value is blank shows its number.
Sourcepub fn add_action_label(self, label: impl Into<String>) -> Self
pub fn add_action_label(self, label: impl Into<String>) -> Self
The label of the add button, as Filament’s addActionLabel(). The default is “Add to
Sourcepub fn addable(self, addable: bool) -> Self
pub fn addable(self, addable: bool) -> Self
Whether rows can be added, as Filament’s addable(). The default is true.
Sourcepub fn deletable(self, deletable: bool) -> Self
pub fn deletable(self, deletable: bool) -> Self
Whether rows can be deleted, as Filament’s deletable(). The default is true.
Sourcepub fn reorderable(self, reorderable: bool) -> Self
pub fn reorderable(self, reorderable: bool) -> Self
Whether rows can be moved up and down, as Filament’s reorderableWithButtons(). The
default is true; false is Filament’s reorderable(false).
Sourcepub fn get_min_items(&self) -> Option<usize>
pub fn get_min_items(&self) -> Option<usize>
The fewest rows, if set.
Sourcepub fn get_max_items(&self) -> Option<usize>
pub fn get_max_items(&self) -> Option<usize>
The most rows, if set.
Sourcepub fn get_item_label(&self) -> Option<&str>
pub fn get_item_label(&self) -> Option<&str>
The sub-field whose value labels each row, if set.
Sourcepub fn get_add_action_label(&self) -> Option<&str>
pub fn get_add_action_label(&self) -> Option<&str>
The label of the add button, if set.
Sourcepub fn is_addable(&self) -> bool
pub fn is_addable(&self) -> bool
Whether rows can be added.
Sourcepub fn is_deletable(&self) -> bool
pub fn is_deletable(&self) -> bool
Whether rows can be deleted.
Sourcepub fn is_reorderable(&self) -> bool
pub fn is_reorderable(&self) -> bool
Whether rows can be moved.
Trait Implementations§
Source§impl Clone for RepeaterSettings
impl Clone for RepeaterSettings
Source§impl Debug for RepeaterSettings
impl Debug for RepeaterSettings
Source§impl Default for RepeaterSettings
impl Default for RepeaterSettings
impl Eq for RepeaterSettings
Source§impl PartialEq for RepeaterSettings
impl PartialEq for RepeaterSettings
impl StructuralPartialEq for RepeaterSettings
Auto Trait Implementations§
impl Forget for RepeaterSettings
impl Freeze for RepeaterSettings
impl Move for RepeaterSettings
impl RefUnwindSafe for RepeaterSettings
impl Send for RepeaterSettingswhere
RawVecInner: Send,
impl Sync for RepeaterSettingswhere
RawVecInner: Sync,
impl Unpin for RepeaterSettings
impl UnsafeUnpin for RepeaterSettings
impl UnwindSafe for RepeaterSettingswhere
RawVecInner: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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