ANIK ISLAM SHOJIB
ANIK ISLAM SHOJIB

Reputation: 3258

react-data-grid x-axis scroll issue

react data grid x-axis scroll not working on browser(crome), my current(70.0.3538.77) version (crome) but working on previous version(69.***). But working fine with other browser. My React Version is "react": "16.4.1", React-data-grid version is "react-data-grid": "4.0.8","react-data-grid-addons": "4.0.8"

Expected Result

Getting No Scroll Option

Upvotes: 1

Views: 1223

Answers (1)

Thomas Kekeisen
Thomas Kekeisen

Reputation: 4406

In my case I had to implement a workaround that fakes a resize event. That made react-data-grid to re-render and show the scrollbars again:

componentDidMount () {
    requestAnimationFrame(function () {
        const event = window.document.createEvent('UIEvents');

        event.initUIEvent( 'resize', true, false, window, 0);

        window.dispatchEvent(event);
    });
}

(see also: How to trigger the window resize event in JavaScript?)

Upvotes: 1

Related Questions