Skip to content
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

[ui5-table]: Table mode Scroll does not work after None mode is set once #8052

Closed
1 task done
eliatso opened this issue Jan 3, 2024 · 5 comments · Fixed by #9434
Closed
1 task done

[ui5-table]: Table mode Scroll does not work after None mode is set once #8052

eliatso opened this issue Jan 3, 2024 · 5 comments · Fixed by #9434
Assignees
Labels
bug This issue is a bug in the code Medium Prio Table_v1 TOPIC Core

Comments

@eliatso
Copy link

eliatso commented Jan 3, 2024

Bug Description

Hello,

I am reporting a bug regarding the Table Scroll mode.

We are setting the table mode to NONE if no load more is needed in the table. But, if it is, the table mode is set to SCROLL.
Basically, if the Table is initialized with SCROLL mode, the scrolling is working fine but once we set it to NONE then to SCROLL again, it will stop working.
It seems like the load more event is not detected. However, it works well with the Button mode (when we click on it, the load more is called).

Thanks in advance.

Affected Component

Table

Expected Behaviour

At initialization Table mode is SCROLL -> Scrolling works
Use filters on table so that Table mode is set to NONE -> No scrolling
Delete the filters and set Table mode to SCROLL again -> Scrolling works again

Isolated Example

No response

Steps to Reproduce

  1. Display a Table containing many items and some filters for the table -> Table mode set to SCROLL and scrolling is working
  2. Filter on some category so that the table contains only a very few items -> set Table mode to NONE so no scrolling
  3. Delete the filters, so all the table rows are displaying again -> Table mode set to SCROLL again but scrolling does not work anymore

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

1.18.0

Browser

Chrome, Edge, Firefox

Operating System

No response

Additional Context

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@eliatso eliatso added the bug This issue is a bug in the code label Jan 3, 2024
@NHristov-sap
Copy link
Contributor

Hi @eliatso ,

Please provide live isolated example in https://codesandbox.io/ or similar that demonstrates the issue.

Best Regards,
Nikolay Hristov

@ilhan007
Copy link
Member

ilhan007 commented Jan 4, 2024

Hi @eliatso you can start with this sample https://codesandbox.io/p/devbox/ui5-webcomponents-starter-k4l955 it already imports the Table (and other components) so you can quickly set up your use-case.

@ilhan007 ilhan007 added the Table label Jan 17, 2024
Copy link

github-actions bot commented Feb 8, 2024

Hello, everyone! The issue has been inactive for 21 days. If there are still questions or comments, please feel free to continue the discussion. Inactive issues will be closed after 7 days!

@github-actions github-actions bot added the Stale label Feb 8, 2024
@eliatso
Copy link
Author

eliatso commented Feb 8, 2024

Hello @NHristov-sap and @ilhan007, sorry for the delay
You can have an example here: https://codesandbox.io/p/devbox/patient-dew-7k466y

Basically, I have created a Table with Scroll as growing mode by defaut

Once you click on None button, growing mode will be set to None
And if Scroll button, it will be set to Scroll

Please click on the None button first, the Table will be well set to None as growing mode
If you then click on Scroll, and try to scroll on the Table, it will not work

The setting with buttons seem to work fine, if you first click on Scroll, the scrolling will still work on the Table

Thank you

@github-actions github-actions bot removed the Stale label Feb 9, 2024
@yanaminkova yanaminkova self-assigned this Feb 9, 2024
@yanaminkova
Copy link
Member

Hello @SAP/ui5-webcomponents-topic-rl,

Please have a look at this issue regarding the ui5-table component and its growing behaviour.
You could find the descriptive steps how to reproduce in the previous comment.
Also, the same behaviour is reproducible in the following storybook example:
https://sap.github.io/ui5-webcomponents/playground/?path=/story/main-table--growing-table-scroll

Thanks and Kind regards,
Yana

ilhan007 pushed a commit that referenced this issue Jul 10, 2024
If the ui5-table is made with mode=Growing, and then the mode is changed to None and back to Growing, the load-more event is not fired anymore. This is because the observed element by IntersectionObserver is not in the DOM anymore because it is conditionally rendered. To fix this, we reset the tableEndObserved flag when the mode changes, so the observed element is set again correctly when the DOM is ready.

Fixes: #8052
@github-project-automation github-project-automation bot moved this from In Progress to Completed in Maintenance - Topic Core Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code Medium Prio Table_v1 TOPIC Core
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

6 participants