You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, both ScrollView and VirtualScrollView have uncontrolled scrolling, meaning you cannot manually control the behavior/state of their scroll.
This could be a good way to make the scrolling optionally controllable:
fnapp(cx:Scope) -> Element{let scroll_controller = use_new_scroll_controller();render!(
rect {
height: "100%",
width: "100%",
padding: "100",
background: "white",
Button{
onclick: move |_| scroll_controller.scroll_to_bottom(),
label {"Scroll to bottom"}}ScrollView{
controller: scroll_controller,
show_scrollbar: true,
rect {
height: "100%",
width: "100%",
background: "rgb(27, 38, 59)",
padding: "25",
onclick: move |_| scroll_controller.scroll_to(0),
label {"Click to go up"}}}})}
Both ScrollView and VirtualScrollView would have an option parameter that would accept a trait object that implements a certain trait that controls how the scroll behaves and would also allow to modify the current scroll position.
Maybe it could even be accessed by their children if it was passed via a context provider.
Currently, both
ScrollView
andVirtualScrollView
have uncontrolled scrolling, meaning you cannot manually control the behavior/state of their scroll.This could be a good way to make the scrolling optionally controllable:
Both
ScrollView
andVirtualScrollView
would have an option parameter that would accept a trait object that implements a certain trait that controls how the scroll behaves and would also allow to modify the current scroll position.Maybe it could even be accessed by their children if it was passed via a context provider.
The text was updated successfully, but these errors were encountered: