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

Not able to scroll down far enough #207

Open
Eainde opened this issue Feb 23, 2019 · 16 comments
Open

Not able to scroll down far enough #207

Eainde opened this issue Feb 23, 2019 · 16 comments

Comments

@Eainde
Copy link

Eainde commented Feb 23, 2019

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
Copy link
Author

Eainde commented Feb 23, 2019

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

@mrchief
Copy link
Collaborator

mrchief commented Feb 23, 2019

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

@Eainde
Copy link
Author

Eainde commented Feb 23, 2019

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

@mrchief
Copy link
Collaborator

mrchief commented Feb 24, 2019

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.

@Eainde
Copy link
Author

Eainde commented Feb 24, 2019

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.

@mrchief
Copy link
Collaborator

mrchief commented Feb 25, 2019

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
Copy link
Collaborator

mrchief commented Feb 27, 2019

@allcontributors[bot] please add @Eainde for bug

@allcontributors
Copy link
Contributor

@mrchief

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

mrchief pushed a commit that referenced this issue Feb 27, 2019
Adds @Eainde as a contributor for bug.

This was requested by mrchief [in this comment](#207 (comment))
mrchief pushed a commit that referenced this issue Mar 28, 2019
Adds @Eainde as a contributor for bug.

This was requested by mrchief [in this comment](#207 (comment))
@yogeshchourey
Copy link

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

@mrchief
Copy link
Collaborator

mrchief commented Jul 19, 2019

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

@ldeveber
Copy link
Contributor

We are also experiencing this issue

@kirti3
Copy link

kirti3 commented Jan 15, 2021

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.

@lyleaigbedion
Copy link

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

@lyleaigbedion
Copy link

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.

@hyeluri
Copy link

hyeluri commented Mar 15, 2021

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 }

@mrchief
Copy link
Collaborator

mrchief commented Mar 15, 2021

Please start a new discussion or issue.

@dowjones dowjones locked as resolved and limited conversation to collaborators Mar 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants