mirror of
https://github.com/ratatui/ratatui.git
synced 2025-09-30 22:41:44 +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::*};
|
||||
/// let state = TableState::new();
|
||||
/// ```
|
||||
pub fn new() -> Self {
|
||||
Self::default()
|
||||
pub const fn new() -> Self {
|
||||
Self {
|
||||
offset: 0,
|
||||
selected: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Sets the index of the first row to be displayed
|
||||
|
Loading…
x
Reference in New Issue
Block a user