redux-lazy-scroll icon indicating copy to clipboard operation
redux-lazy-scroll copied to clipboard

overflow:scroll on the container is bad

Open ThiefMaster opened this issue 7 years ago • 5 comments
trafficstars

It results in scroll bars on the container even though there is nothing to scroll in it. This is already the case in the demo here: https://ancient-sands-71156.herokuapp.com/

ThiefMaster avatar Apr 23 '18 14:04 ThiefMaster

What you can do is that:

  1. Get the data from the server for checking whether there are items left to fetch or the total amount of items. E.g {total: 100}
  2. There is a hasMore prop. Pass there false if there are no items left. E.g
<ReduxLazyScroll
    hasMore={store.fetchedItems.length === store.total}
>

This way it won't make an additional request.

shotaK avatar Apr 23 '18 15:04 shotaK

I'm not talking about additional requests (I'm already using hasMore). I'm talking about these scroll bars:

image

There are horizontal ones as well.

Since the scrollable element is the body/document itself, having scroll bars on the .redux-lazy-scroll container looks a lot like a bug.

ThiefMaster avatar Apr 23 '18 15:04 ThiefMaster

Yes, you are right, it should only have scroll if the prop isParentScrollable is set true.

shotaK avatar Apr 23 '18 15:04 shotaK

Hi @shotaK,

Any fix for this? I'm currently using custom CSS to set overflow to hidden. Which is not ideal.

SidneyNiccolson avatar Sep 17 '19 13:09 SidneyNiccolson

Hi @shotaK any update on this bug?

himanshu64 avatar Nov 07 '21 09:11 himanshu64