-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
problem with table.ScrollToBottom #2918
Comments
Sorry, this is the wrong issue tracker. This one is only for the developer site and not for bugs related to Fyne. |
I don't understand this part:
What would the expected outcome be if there is nothing to scroll? In what way is it failing? |
It crashes. It panics. |
Actually, it (the table) asks the provided function for value for a cell with negative row number. Which causes the provided function to crash because of using a negative array index. |
Ah I see thanks. This is jogging something of my memory but I cannot find an issue. |
Yes, I am on v2.1.4. It looks like the ScrollToBottom tries to place the bottom row at the last visible line. And it calculates the row number for the first visible line. Because the number of rows is less than the number of visible lines, the row number for the first visible line becomes negative. |
Ah I see, this is a crash from -1? That was not clear from the description. |
This is it. |
There were some fixes in v2.2.0, please check against that. Otherwise it might be resolved with the linked PR. |
Yes, it works with 2.2.1
…On Tue, Jun 21, 2022 at 4:42 PM Andy Williams ***@***.***> wrote:
There were some fixes in v2.2.0, please check against that. Otherwise it
might be resolved with the linked PR.
—
Reply to this email directly, view it on GitHub
<#2918 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE2N6NKXMVJR627P5JW2K3TVQHBDXANCNFSM5TJSWP6Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Excellent thanks |
When the table is long and only part of it is displayed, then ScrollToBottom works fine.
When the table is short and is displayed in full, then ScrollToBottom fails.
The test bellow works with "go run . 12" and fails with "go run . 4"
The text was updated successfully, but these errors were encountered: