Add `TableState.offset(&self) -> usize`

pull/481/head
Aaron Rennow 3 years ago
parent 91a2519cc3
commit 2317398486

@ -392,6 +392,13 @@ impl TableState {
self.offset = 0;
}
}
/// Returns a copy of the receiver's scroll offset.
///
/// This is useful, for example, if you need to "synchronize" the scrolling of a `Table` and a `Paragraph`.
pub fn offset(&self) -> usize {
self.offset
}
}
impl<'a> StatefulWidget for Table<'a> {

Loading…
Cancel
Save