-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
tables unable to scroll manually or using table.scroll_to_bottom #2281
Comments
I mentioned this on Discord where the issue arose - but when providing example code, it's important that the example is minimal. There is a big difference between debugging an issue with a widget, and debugging an 800 line program that, coincidentally, uses a widget. |
Ok - now we have an example that can be reproduced - and, as a result, the problem becomes clear. The issue is that at the point you're invoking I agree that it's counterintuitive, and it would be desirable to fix it; but there are limitations to what we can do - this is always going to be a problem with any GUI-related operation on platforms rendering of a change doesn't happen as a direct consequence (and synchronously) of making the change with an API. Android is particularly susceptible to this (see #2274 for another example), but other platforms can have analogous issues. The immediate workaround is to defer the "scroll to bottom" call until there's been a chance to redraw the GUI. Something like the following will work:
That is - create a background task, and make the GUI change there. This will happen "later" - it will be added to the queue of operations to be performed, but will be scheduled after the GUI update caused by adding rows to the table. |
Describe the bug
here are the simplified codes of my application, which only the number inputs for 'total attacker' and 'total defender', and the button 'allout attack' is working and there is no logical calculations:
use for syntax, logic check, complete code down below
here are the complete codes of my application:
use this to compile into apk and test
Steps to reproduce
Expected behavior
expectation:
the tables should automatically scroll to bottom when the function is complete
observation:
in briefcase dev - table can and does scroll to bottom
on android phone - table does not scroll at all
Screenshots
^screenshot of briefcase dev using complete code, there is a slider for the table and it did automatically scroll to bottom
^screenshot of android phone running the app, the table is un-scrollable and does not automatically scroll, both screenshot shows the same code running
Environment
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: