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

Horizontal scrollbar is not working #143

Open
sadashivm opened this issue Nov 5, 2019 · 3 comments
Open

Horizontal scrollbar is not working #143

sadashivm opened this issue Nov 5, 2019 · 3 comments

Comments

@sadashivm
Copy link

  1. App.js

import React from 'react';
import ScrollArea from 'react-scrollbar';

function App() {
let itemElements = [];

for (let i = 1; i <= 40; i = i + 1) {
itemElements.push(
<div className="items">Text Content {i}</div>
)
}

return (
<>
<div style={{ margin: '4em' }}>
<h4>Horizontal scrollbar</h4>
<ScrollArea
className="area"
contentClassName="content"
vertical={false}
smoothScrolling
>
{itemElements}
</ScrollArea>
</div>

<div style={{ margin: '4em' }}>
<h4>Vertical Scrollbar</h4>
<ScrollArea
className="area2"
smoothScrolling
>
{itemElements}
</ScrollArea>
</div>
</>
);
}

export default App;

  1. CSS CODE
    .area { height: 80px; width: 300px; border:1px solid red; white-space: nowrap !important; } .items { margin:10px; display: inline-block !important; width: 150px; border:1px solid blue; } .content { width: 500px; } .area2 { border: 1px solid; height: 300px; width: 300px; }

Horizontal scroll is not coming, vertical scroll is working perfectly.
I want to display all the records.
can you please write a code for horizontal scroll.
Please check the attached screen shot

Horizontal_Scroll_Issue

Please send me code for to display all the items using horizontal scroll

@dmytro-petruk-deel
Copy link

dmytro-petruk-deel commented Dec 30, 2019

React v16.11.0
It doesn't work on my side either.

@adkrix
Copy link

adkrix commented Jul 15, 2020

React 16.13.1
It doesn't work

@ooo2003003v2
Copy link

doesnt work on 17.0.2 either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants