react-scrollbars-custom icon indicating copy to clipboard operation
react-scrollbars-custom copied to clipboard

translateContentSizeYToHolder with display: table-cell cause problem

Open gaetansnl opened this issue 5 years ago • 5 comments

What is the current behavior? Scrollbar break the placement. It works if I remove display: table-cell

What is the expected behavior? To get the same result as without Scrollbar

 <Scrollbar translateContentSizeYToHolder>
  <div style={{display: 'flex', alignItems:'center'}}>
                    <div style={{ margin: '0 auto' }} />
                                <div style={{display: 'flex', flex: '0 0 240px'}}>
                                    test
                                </div>
                    <div style={{ margin: '0 auto' }} />
                </div>
</Scrollbar>

A little about versions:

  • OS: Windows
  • Browser (vendor and version): All
  • React: Latest
  • react-scrollbars-custom: v4.0.18

gaetansnl avatar Aug 28 '19 15:08 gaetansnl

@gaetansnl Please provide sandbox;

xobotyi avatar Aug 30 '19 09:08 xobotyi

@xobotyi Here it is https://codesandbox.io/s/angry-ramanujan-ht39t

gaetansnl avatar Sep 02 '19 14:09 gaetansnl

Same issue here on v4.0.18. For me content's width set to 100% is not working correctly

bdobry avatar Sep 18 '19 12:09 bdobry

Adding this code to the scrollbar component fixed it for me: contentProps={{ style: { display: 'block' }, }}

ranihorev avatar Oct 08 '19 16:10 ranihorev

FWIW This issue is still persent on 4.0.21.

kiliancs avatar Mar 06 '20 23:03 kiliancs