mirror of
https://github.com/ratatui/ratatui.git
synced 2025-10-02 15:25:54 +00:00
feat(table): make TableState::new const (#1040)
This commit is contained in:
parent
81b96338ea
commit
bf0923473c
@ -60,8 +60,11 @@ impl TableState {
|
|||||||
/// # use ratatui::{prelude::*, widgets::*};
|
/// # use ratatui::{prelude::*, widgets::*};
|
||||||
/// let state = TableState::new();
|
/// let state = TableState::new();
|
||||||
/// ```
|
/// ```
|
||||||
pub fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
Self::default()
|
Self {
|
||||||
|
offset: 0,
|
||||||
|
selected: None,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Sets the index of the first row to be displayed
|
/// Sets the index of the first row to be displayed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user