react-dropdown-tree-select icon indicating copy to clipboard operation
react-dropdown-tree-select copied to clipboard

Not able to scroll down far enough

Open Eainde opened this issue 6 years ago • 16 comments

Describe the bug When I expand a tree and the list is very long it is not allowing me to scroll down far enough and I am not able to see the next parent. It works fine if there is a small list of children then It works fine but for long lists, it is causing an issue.

Expected behavior If there is a long list it should allow me to scroll down and see all the children associated to the parent and it should also allow me to see the next parent

Environment (please complete the following information):

  • Browser: Chrome, IE, Firefox
  • OS: Windows, Mac
  • node version: 8.11.1
  • npm version: 5.6.0

Eainde avatar Feb 23 '19 13:02 Eainde

This is only happening in Material design, in bootstrap design, it is working fine. I have attached the snapshots for your reference. screen shot 2019-02-23 at 1 54 38 pm screen shot 2019-02-23 at 1 54 46 pm screen shot 2019-02-23 at 1 54 57 pm

Eainde avatar Feb 23 '19 13:02 Eainde

@Eainde It may be possible that Material Design's referenced version is an older one. Can you update to latest and try again?

mrchief avatar Feb 23 '19 17:02 mrchief

Yes, I have updated the version. I am using 1.16.0. You can find this defect in the editor, which is mentioned in the demo link.

Editor Link: https://dowjones.github.io/react-dropdown-tree-select/#/story/with-material-design-styles

Eainde avatar Feb 23 '19 23:02 Eainde

I tried to repro the issue but I don't see it. Here's a screenshot:

qrxjhouksl

Are you expecting a scrollbar to appear within the menu? If so, then you'll have to apply CSS to get that. Here's an example.

mrchief avatar Feb 24 '19 23:02 mrchief

No, I am not expecting that. If any parent tag has a large set of children eg 100 and if you scroll down you won't be able to see the next parent tag. eg Bind 100 children to VP Accounting and scroll down to the end, you won't be able to see Database Administrator |||. You have to shrink the expansion in order to see the next parent value.

Eainde avatar Feb 24 '19 23:02 Eainde

100 children to VP Accounting and scroll down to the end, you won't be able to see Database Administrator |||

Oh, I see what the problem is now. In order to support large trees, we cap at 100 child nodes and use onscroll event to draw more child nodes. The problem is that the component is listening to the container's onScroll which never happens in your case (it's the window that scrolls).

This is an unhandled case which should be handled. I don't have any ideas right now but I would start at conditionally setting the scrollableTarget here based on whether the parent has overflow or not. If detecting a css property seems like too much of a hack then we'd have to introduce a boolean prop and let the users tell us if they have overflow enabled or not.

Would you be interested in contributing a fix for this?

mrchief avatar Feb 25 '19 00:02 mrchief

@allcontributors[bot] please add @Eainde for bug

mrchief avatar Feb 27 '19 15:02 mrchief

@mrchief

I've put up a pull request to add @Eainde! :tada:

allcontributors[bot] avatar Feb 27 '19 15:02 allcontributors[bot]

@mrchief : Is this issue fixed ? Please let me know the release number

yogeshchourey avatar Jul 19 '19 07:07 yogeshchourey

@yogeshchourey No, it’s not. If you'd like to help, I'll gladly accept a PR.

mrchief avatar Jul 19 '19 15:07 mrchief

We are also experiencing this issue

ldeveber avatar Jul 28 '20 20:07 ldeveber

Hi We also experiencing this issue , kindly please update whenever it is fixed. Please update asap and it's looks like a blocker for our release.

kirti3 avatar Jan 15 '21 17:01 kirti3

Hi, can you provide more clarification as to what can be done to solve this issue?

lyleaigbedion avatar Feb 03 '21 19:02 lyleaigbedion

I actually found a work around for my project. I added .dropdown-content{ overflow-y: auto } to my css and it scrolls properly for me.

lyleaigbedion avatar Feb 04 '21 22:02 lyleaigbedion

I am using material-ui and I had to add both of these:

.dropdown-content .infinite-scroll-component { overflow-y: inherit; }

.dropdown-content{ overflow-y: auto }

hyeluri avatar Mar 15 '21 21:03 hyeluri

Please start a new discussion or issue.

mrchief avatar Mar 15 '21 22:03 mrchief