Skip to content

(Chrome) Scrollbar not working when parent/grandparent's scrollbar is visible #3467

Open
@holospice18

Description

@holospice18

Describe the bug

DataGrid's scrollbar is not dragable.

I'm working on a page with title bar and sub-window.
In my real use case is that almost half of the viewport is available for DataGrid and I need multiple of it so it will need scrollbar.

The code below is the simplified version.

To Reproduce

  1. Create parent 'div' with height of '100vh'
  2. Add 'DataGrid' child with height greater than viewport to enable scrollbar

Link to code example:

        <body>
            <div style={{color: "white", backgroundColor: "#132132", height: "60px"}}>
                Title bar
            </div>
            <div id="subWindow" style={{height: "calc(100vh - 60px)", overflow: "auto"}}> 
              {/* calculate reamaining viewport space (minus title bar height)*/}
              {/* scroll bar should be on "subWindow" only*/}
                <div style={{height: "500px", padding: "10px"}}>
                    <DataGrid
                        columns={columns}
                        rows={rows}
                        style={{blockSize: "100%"}}
                    />
                </div>
                <br/>
                <div style={{height: "500px", padding: "10px"}}>
                    <DataGrid
                        columns={columns}
                        rows={rows}
                        style={{blockSize: "100%"}}
                    />
                </div>
            </div>
        </body>

Expected behavior

It works fine on Firefox.
Only happens when the parent/grandparent's scrollbar is visible

Environment

  • react-data-grid version: 7.0.0-beta.36
  • react/react-dom version: 18.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions