SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 262 forks source link

[ui5-table]: load-more event not being fired #8160

Closed egor-sap closed 7 months ago

egor-sap commented 8 months ago

Bug Description

When using the ui5-table with "growing=Scroll", the "load-more" event is not fired unless there is a scroll event.

Affected Component

ui5-table

Expected Behaviour

Expect the "load-more" event to be fired if the bottom of the table is in the viewport, even if there is no scroll bar.

Currently if the table has a fixed height, but not enough items to cause an overflow, there will be no scroll bar, and thus no way to trigger the "load-more" event.

Isolated Example

https://codesandbox.io/p/sandbox/ui5-webcomponents-forked-ycc3sr?file=%2Findex.html%3A29%2C48

Steps to Reproduce

  1. Go to https://codesandbox.io/p/sandbox/ui5-webcomponents-forked-ycc3sr?file=%2Findex.html%3A29%2C48
  2. Open the console and see there is no log for "load-more fired" and there is no scrollbar so the event can't be triggered

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

1.19.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SuccessFactors

Declaration

LidiyaGeorgieva commented 8 months ago

Hello @SAP/ui5-webcomponents-topic-rl, I am forwarding this issue to you, because there is a question regarding Table component. Regards, Lidiya

ilhan007 commented 8 months ago

@SAP/ui5-webcomponents-topic-rl also internal thread opened

ivoplashkov commented 8 months ago

Hello,

I've tried to reproduce the issue in the codesandbox as described by the reporter, but I was not able to. I've also reached to several colleagues on different OS and the event seems to be fired. Could you please provide more information on Browser / OS combination and in what cases this event is not fired.

Thank you in advance! Regards, Ivaylo

egor-sap commented 8 months ago

@ivoplashkov I updated the sandbox to more accurately show the issue:

The "load-more" event is only fired immediately as the table is rendered.

For our case, we have a full page table which is empty and "busy" until the initial data is loaded. After the initial items are in the table, the "load-more" event should to be fired because the bottom of the table has technically been reached (though not by scroll).

niyap commented 7 months ago

Hello @egor-sap,

As discussed with Martin in the chat, we prevented the load-more event on initial rendering.

Kind Regards, Niya