Skip to content

[SF][Table]: Table will scroll to top when fitst time loadmore #11298

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

Closed
1 task done
yuyuCream opened this issue Apr 8, 2025 · 8 comments · Fixed by #11358
Closed
1 task done

[SF][Table]: Table will scroll to top when fitst time loadmore #11298

yuyuCream opened this issue Apr 8, 2025 · 8 comments · Fixed by #11358
Assignees
Labels

Comments

@yuyuCream
Copy link

Describe the bug

The table will scroll to the top and focus on the first line when the "onLoadMore" is triggered for the first time by scrolling down. For subsequent "onLoadMore" triggers, if a different line is selected, the table will also scroll to the top and focus on the first line.

Isolated Example

No response

Reproduction steps

  1. https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/data-display-table--growing-table
  2. Scroll down to trigger the "onLoadMore" functionality for the first time.
  3. Observe that the table scrolls to the top and focuses on the first line.
  4. Select a different line in the table.
  5. Scroll down again to trigger the "onLoadMore" functionality.
  6. Observe that the table scrolls to the top and focuses on the first line once more.

This issue only occurs in version 2.0 and works fine in version 1.0.

Expected Behaviour

No response

Screenshots or Videos

No response

UI5 Web Components for React Version

2.8.0

UI5 Web Components Version

2.8.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

Organization

SF

Declaration

  • I’m not disclosing any internal or sensitive information.
@Lukas742
Copy link
Collaborator

Lukas742 commented Apr 8, 2025

Hi @yuyuCream

I wasn't able to reproduce this issue (Chrome Version 134.0.6998.167), so please add an isolated example that is showing the issue. Preferably by using this StackBlitz template.

2025-04-08_09-27-34.mp4

@yuyuCream
Copy link
Author

Hi @Lukas742
The example may have changed in recent days. I noticed there's an 'experimental' label in the document. The issue I mentioned only occurs with the scroll type, not when clicking the 'more' button.

Additionally, I found an error in the example: even if the type is set to scroll in the DOM, there is still a 'more' button in the table.

Image

@Lukas742
Copy link
Collaborator

Lukas742 commented Apr 9, 2025

Hi @yuyuCream

that's why we ask for an isolated example. Please provide it then we can process the issue further.
Also, I noticed our example uses a deprecated API which will be removed with this PR.

@yuyuCream
Copy link
Author

Hi @Lukas742
The issue can be reproduced at the following link: https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/data-display-table--growing-table. Please select the "Scroll" option for the growing mode.

Image

@Lukas742
Copy link
Collaborator

Lukas742 commented Apr 10, 2025

@yuyuCream I was finally able to reproduce the issue, but the behavior seems to be flaky because I needed some tries before it occurred.

Since the Table and all of its subcomponents are web components, developed by the UI5 Web Components team, I'm forwarding this issue to their repo.


Hi Colleagues,
your "Scroll" example is still using type which was replaced by mode. If you change that in the editor and scroll slowly to the end of the table, the issue occurred for me almost every time.

2025-04-10_13-10-23.mp4

@Lukas742 Lukas742 transferred this issue from SAP/ui5-webcomponents-react Apr 10, 2025
@plamenivanov91 plamenivanov91 added TOPIC TBL Medium Prio bug This issue is a bug in the code labels Apr 11, 2025
@plamenivanov91
Copy link
Contributor

Hello colleagues,

Steps to reproduce:

  1. Go to sample link
  2. Change "type" prop to "mode"
  3. Select a random row
  4. Scroll until load more is triggered
  5. First element of table is selected

Could you please take over?

Regards,
Plamen Ivanov

Copy link

This issue has been closed. To reopen, just leave a comment!

@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This issue has been resolved in version v2.10.0-rc.2 🎉

The release is available on v2.10.0-rc.2

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

5 participants