pub struct Tabs { /* private fields */ }Expand description
Tabs, as Filament’s Tabs schema component: one card whose tab list shows one Tab of
fields at a time. The first tab is open when the form shows, as in Filament, unless
active_tab names another. Every tab’s fields are in the form, so a
save sends them all, whichever tab is open.
use ignite_core::layout::{Tab, Tabs};
use ignite_core::{FormLayout, Section};
let layout = FormLayout::new().schema([Tabs::make("Settings").tabs([
Tab::make("General").schema(["description", "active"]),
Tab::make("Labels").schema([Section::make("Menu").schema(["menu_name"])]),
])]);Implementations§
Source§impl Tabs
impl Tabs
Sourcepub fn make(label: impl Into<String>) -> Self
pub fn make(label: impl Into<String>) -> Self
Tabs with the label label, which names the tab list for a screen reader, as
Tabs::make('Settings'). They have no tabs until tabs.
Sourcepub fn tabs(self, tabs: impl IntoIterator<Item = Tab>) -> Self
pub fn tabs(self, tabs: impl IntoIterator<Item = Tab>) -> Self
The tabs, in display order, as ->tabs([...]). Each call adds after the tabs given.
Sourcepub fn active_tab(self, tab: usize) -> Self
pub fn active_tab(self, tab: usize) -> Self
The tab open when the form shows, counted from 1, as Filament’s ->activeTab(2). A
number past the last tab opens the first.
Sourcepub fn column_span(self, columns: u8) -> Self
pub fn column_span(self, columns: u8) -> Self
The columns the tabs take in the form’s grid, as ->columnSpan(2).
Sourcepub fn column_span_full(self) -> Self
pub fn column_span_full(self) -> Self
Takes every column, as ->columnSpanFull().
Sourcepub fn active_index(&self) -> usize
pub fn active_index(&self) -> usize
The index (from 0) of the tab open when the form shows.
Sourcepub fn get_column_span(&self) -> ColumnSpan
pub fn get_column_span(&self) -> ColumnSpan
The columns the tabs take.
Trait Implementations§
impl Eq for Tabs
impl StructuralPartialEq for Tabs
Auto Trait Implementations§
impl Forget for Tabs
impl Freeze for Tabs
impl Move for Tabs
impl RefUnwindSafe for Tabs
impl Send for Tabs
impl Sync for Tabs
impl Unpin for Tabs
impl UnsafeUnpin for Tabs
impl UnwindSafe for Tabs
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