tabs icon indicating copy to clipboard operation
tabs copied to clipboard

Issue with storyshots

Open florian-bd opened this issue 6 years ago • 1 comments

When I use this component in a storyshot I get the following error:

TypeError: Cannot read property 'scrollHeight' of undefined
  at ScrollableTabBarNode.getScrollWH

Seems like it is relying on some browser property

florian-bd avatar Jan 21 '19 14:01 florian-bd

Here is how to workaround the issue. Note that if you are using ant design you will have another issue https://github.com/ant-design/ant-design/issues/14462

     createNodeMock: element => {
        if (
            element.props &&
            element.props.className &&
            element.props.className.includes('ant-tabs-nav')
        ) {
            return document.createElement('div');
        }
    },

florian-bd avatar Jan 21 '19 15:01 florian-bd