Skip to content

Commit

Permalink
Add scroll extension (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmoulton authored Sep 30, 2024
1 parent 2d44090 commit eeb88ac
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/views/scroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,3 +1015,13 @@ impl ScrollCustomStyle {
self
}
}

pub trait ScrollExt {
fn scroll(self) -> Scroll;
}

impl<T: IntoView + 'static> ScrollExt for T {
fn scroll(self) -> Scroll {
scroll(self)
}
}

0 comments on commit eeb88ac

Please sign in to comment.