-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scroll_to with zero duration does nothing #1659
Labels
bug
Something isn't working
Comments
Indeed, it doesn't do anything with import flet as ft
def main(page: ft.Page):
lv = ft.ListView(spacing=10, padding=20, height=200, width=200)
for i in range(0, 1000):
lv.controls.append(ft.Text(f"Line {i}"))
page.add(
ft.Container(lv, border=ft.border.all(1)),
ft.ElevatedButton(
"Scroll!", on_click=lambda _: lv.scroll_to(offset=-1, duration=1)
),
)
ft.app(target=main) Screen.Recording.2023-09-14.at.9.50.21.AM.mov |
I think it makes sense to default duration to |
FeodorFitsner
added a commit
that referenced
this issue
Nov 6, 2023
zrr1999
pushed a commit
to zrr1999/flet
that referenced
this issue
Jul 17, 2024
* AlertDialog uses global state * DatePicker uses global state * State on the control level * Control-level state Fix flet-dev#2025, Fix flet-dev#1807, Fix flet-dev#1236, Fix flet-dev#1772 * Fix control tests * Bump fl_chart to 0.64.0 * Fix `scroll_to` with 0 animation duration Fix flet-dev#1659 * Fix page.width/.height on session start Fix flet-dev#1960 * Fix Flet version retrieval on non-English environments Fix flet-dev#1997
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling the .scroll_to() method (on e.g. a listview) with a duration unset or zero does not scroll the listview at all. It seems to work poorly on duration values smaller than 500.
I have listviews with 2000 lines and it seems to "need" at least 500ms to scroll it properly. My graphics are a bit slow since it is over vnc, but that should not be a factor in this.
The text was updated successfully, but these errors were encountered: